I have installed the official version of Telegram, but now I cannot remove it.
I have tried apt remove telegram
and other methods, is there any trick to remove it completely?
I have installed the official version of Telegram, but now I cannot remove it.
I have tried apt remove telegram
and other methods, is there any trick to remove it completely?
If you downloaded Telegram directly from the website, then your package management system has no idea about it, and you have to remove the files yourself. You may find them in ~/Downloads
but perhaps you put them somewhere else, for example /opt
. If you have been using Telegram you may also find an automatically created directory in ~/Downloads
called Telegram Desktop
which contains files you have downloaded from Telegram messages. There may also be a hidden directory in your home ~/.TelegramDesktop
. You can remove Telegram by deleting all these files and directories.
If you can't find them dosudo updatedb && locate Telegram
to see where they are.
If you installed from the Atareao PPA then remove the PPA itself:
sudo apt remove telegram
sudo add-apt-repository -r ppa:atareao/telegram
As mentioned by @Anwar, there is a package called ppa-purge
which removes ppas more gracefully, attempting to restore any packages from ppa to repository versions as well as removing the ppa versions. You don't need it in this case, since there is no repository version of Telegram, however, it is the preferred way to remove ppas:
sudo apt install ppa-purge
sudo ppa-purge ppa:atareao/telegram
This will uninstall any packages from the ppa as well as removing it.
If you installed the snap package telegram-sergiusens
then do
sudo snap remove telegram-sergiusens
~/.local/shares/TelegramDesktop
. It's important to also remove this directory for privacy protection.
Run:
sudo apt remove telegram-desktop
~/Donwloads
folder
Feb 1, 2021 at 12:51
search and delete the "TelegramDesktop" folder.
in my case:
lsof|grep Telegram
revealed it was under:
~/.local/share/TelegramDesktop/
Telegram install in ubuntu with
sudo snap install telegram-desktop
You can remove it with
sudo snap remove telegram-desktop
If you used flatpak:
Locate telegram flatpak id:
$ flatpak list
Ref Options
org.telegram.desktop/x86_64/stable system,current
Uninstall Telegram:
$ flatpak uninstall org.telegram.desktop/x86_64/stable
I have done:
find / -iname "*telegram*" 2>/dev/null
I found:
/home/marco/.local/share/applications/telegramdesktop.desktop
/home/marco/.local/share/icons/telegram.png
/home/marco/.local/share/TelegramDesktop
/home/marco/Downloads/Telegram Desktop
/var/lib/app-info/icons/ubuntu-bionic-universe/64x64/telegram-desktop_telegram.png
So it seems like you have downloaded the official executable file from the official website of Telegram. You can't remove it with your apt
package manager because it has nothing to do with that because it is a application/x-executable
type binary file. So in order to remove it completely do the steps I am writing below :
To remove the desktop entry/shortcut delete the following file (I'm using GNOME desktop in this case):
/home/ri5h46h/.local/share/applications/telegramdesktop.desktop
deleting it will remove the desktop icon... you can also remove it using the rm
command
Next delete the main executable file which may be in your Downloads folder
Delete the whole folder which you extracted from the downloaded file.
After doing above steps, telegram is removed 98% from your PC because still some files stay in /home/<username>/.local
folder
Following are those files, you can remove them if you want to
/home/ri5h46h/.local/share/TelegramDesktop
(This is a Directory)
/home/ri5h46h/.local/share/icons/telegram.png
(Telegram icon)
I removed Telegram using pLumo's answer:
This Telegram app just installs a
.desktop file
, its icon and a folder where it saves its data:Remove the folder with the Telegram and Updater file.
Then run:
rm -Rf \ ~/.local/share/icons/telegram.png \ ~/.local/share/applications/telegramdesktop.desktop \ ~/.local/share/TelegramDesktop