How do I uninstall Telegram which was installed from the tar.xz obtained from the official website?

I installed Telegram by visiting https://desktop.telegram.org/ and downloaded a tar.xz file. After which I ran

tar -xJf telegram.tar.xz

which uncompressed the tar.xz file and gave me Telegram and Updater in a folder.

Both the files have an executable (application/x-executable) as their type. I installed Telegram by double clicking the Telegram file.

Now, I'm not sure how do I uninstall it. I tried

apt remove telegram

but it said "Unable to locate package telegram" since it wasn't installed from apt. How do I properly uninstall Telegram Desktop?


Solution 1:

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

Solution 2:

I installed Telegram by double clicking the Telegram file.

No, you didn't install Telegram by double clicking, neither apt was involved in any way. The tar.xz package contains a pre-compiled executable for Telegram Desktop and it executes it every time you launch it. Simply delete the extracted folder to get rid of Telegram.


Also follow the answer by @pLumo to remove other residue files.

Solution 3:

I think the way you did it, Telegram is not really "installed" anywhere other than where you unpacked the telgram.tar.xz file. It runs directly from that location. When you unpacked it you got a Telegram directory, right? Just remove that, then Telegram is gone.

The apt remove way of removing packages generally works when that package was installed using apt install.