Created
January 19, 2026 13:41
-
-
Save otnamhcar/ef12ccb60f53e0d86cfe75a334812038 to your computer and use it in GitHub Desktop.
Script UNINSTALL — uninstall-telegram.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| INSTALL_DIR="/opt/telegram" | |
| BIN_LINK="/usr/local/bin/telegram" | |
| DESKTOP_FILE="/usr/share/applications/telegram.desktop" | |
| ICON_PATH="/usr/share/icons/hicolor/256x256/apps/telegram.png" | |
| echo "[+] Removing Telegram Desktop installation..." | |
| sudo rm -rf "$INSTALL_DIR" | |
| sudo rm -f "$BIN_LINK" | |
| sudo rm -f "$DESKTOP_FILE" | |
| sudo rm -f "$ICON_PATH" | |
| echo "[+] Updating desktop database" | |
| sudo update-desktop-database | |
| echo "[✓] Telegram Desktop uninstalled successfully" | |
| echo "[i] User data preserved at:" | |
| echo " ~/.local/share/TelegramDesktop/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment