Score:0

Problem Uninstalling Telegram via Terminal

cn flag

Having tried many standard terminal commands for removing Telegram which came up Ubuntu 20.04 after installation. All the commands returned error: there is no app like that on the system, though I keep seeing the app on the list of general applications and I can also open it, but not login into it. I tried the following commands:

samuelson@syncserve:~$ flatpak uninstall org.telegram.desktop/x86_64/stable
Command 'flatpak' not found, but can be installed with:

So, I figured that I needed to check via command for all the paths directory exists if any; hence I used the command below to check all possible paths for telegram:

find / -iname "*telegram*" 2>/dev/null

The output of the command was surprising, it was such a long list of directories for telegram, see below.

My issue here is how do I remove this program?

samuelson@syncserve:~$ find / -iname "*telegram*" 2>/dev/null
    /var/lib/snapd/mount/snap.telegram-desktop.fstab
    /var/lib/snapd/mount/snap.telegram-desktop.user-fstab
    /var/lib/snapd/apparmor/profiles/snap.telegram-desktop.telegram-desktop
    /var/lib/snapd/apparmor/profiles/snap-update-ns.telegram-desktop
    /var/lib/snapd/apparmor/profiles/snap.telegram-desktop.hook.configure
    /var/lib/snapd/desktop/applications/telegram-desktop_telegram-desktop.desktop
    /var/lib/snapd/seccomp/bpf/snap.telegram-desktop.hook.configure.src
    /var/lib/snapd/seccomp/bpf/snap.telegram-desktop.telegram-desktop.bin
    /var/lib/snapd/seccomp/bpf/snap.telegram-desktop.telegram-desktop.src
    /var/lib/snapd/seccomp/bpf/snap.telegram-desktop.hook.configure.bin
    /var/lib/snapd/sequence/telegram-desktop.json
    /var/lib/snapd/snaps/telegram-desktop_3544.snap
    /var/lib/snapd/snaps/telegram-desktop_3530.snap
    /var/lib/snapd/inhibit/telegram-desktop.lock
    /var/lib/app-info/icons/ubuntu-focal-universe/64x64/telegram-desktop_telegram.png
    /var/lib/app-info/icons/ubuntu-focal-universe/48x48/telegram-desktop_telegram.png
    /var/lib/app-info/icons/ubuntu-focal-updates-universe/64x64/telegram-desktop_telegram.png
    /var/lib/app-info/icons/ubuntu-focal-updates-universe/48x48/telegram-desktop_telegram.png
    /var/snap/telegram-desktop
    /var/cache/apt/archives/telegram-desktop_2.1.7+ds-2~ubuntu20.04.1_amd64.deb
    /usr/lib/ezra-bible-app/resources/app/node_modules/@fortawesome/fontawesome-free/svgs/brands/telegram-plane.svg
    /usr/lib/ezra-bible-app/resources/app/node_modules/@fortawesome/fontawesome-free/svgs/brands/telegram.svg
    /tmp/snap.telegram-desktop
    /run/snapd/ns/telegram-desktop.mnt
    /run/snapd/ns/snap.telegram-desktop.info
    /run/snapd/ns/snap.telegram-desktop.fstab
    /run/snapd/lock/telegram-desktop.lock
    /run/user/1000/snap.telegram-desktop
    /run/user/1000/doc/by-app/snap.telegram-desktop
    /run/systemd/units/invocation:snap-telegram\x2ddesktop-3544.mount
    /run/systemd/units/invocation:snap-telegram\x2ddesktop-3530.mount
    /run/udev/tags/snap_telegram-desktop_telegram-desktop
    /etc/systemd/system/snap-telegram\x2ddesktop-3530.mount
    /etc/systemd/system/multi-user.target.wants/snap-telegram\x2ddesktop-3530.mount
    /etc/systemd/system/multi-user.target.wants/snap-telegram\x2ddesktop-3544.mount
    /etc/systemd/system/snap-telegram\x2ddesktop-3544.mount
    /etc/udev/rules.d/70-snap.telegram-desktop.rules
    /snap/wormhole/349/lib/python3.8/site-packages/tqdm/contrib/__pycache__/telegram.cpython-38.pyc
    /snap/wormhole/349/lib/python3.8/site-packages/tqdm/contrib/telegram.py
    /snap/telegram-desktop
    /snap/telegram-desktop/3530/meta/gui/telegram-desktop.desktop
    /snap/telegram-desktop/3530/usr/bin/telegram-desktop
    /snap/telegram-desktop/3530/usr/share/applications/telegram-desktop_telegram-desktop.desktop
    /snap/telegram-desktop/3530/usr/share/metainfo/telegram-desktop_telegram-desktop.metainfo.xml
    /snap/telegram-desktop/3544/meta/gui/telegram-desktop.desktop
    /snap/telegram-desktop/3544/usr/bin/telegram-desktop
    /snap/telegram-desktop/3544/usr/share/applications/telegram-desktop_telegram-desktop.desktop
    /snap/telegram-desktop/3544/usr/share/metainfo/telegram-desktop_telegram-desktop.metainfo.xml
    /snap/vlc/2344/usr/share/icons/breeze/apps/48/telegram.svg
    /snap/vlc/2344/usr/share/icons/breeze-dark/apps/48/telegram.svg
    /snap/bin/telegram-desktop
    /home/samuelson/snap/snap-store/common/.cache/gnome-software/odrs/org.telegram.desktop.json
    /home/samuelson/snap/telegram-desktop
    /home/samuelson/snap/telegram-desktop/3530/.local/share/TelegramDesktop
    /home/samuelson/snap/telegram-desktop/3544/.local/share/TelegramDesktop
    /home/samuelson/.local/share/TelegramDesktop
    /sys/kernel/slab/:A-0000192/cgroup/cred_jar(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/:A-0000192/cgroup/cred_jar(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/:A-0001024/cgroup/PING(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/:A-0001024/cgroup/PING(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/sock_inode_cache/cgroup/sock_inode_cache(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/sock_inode_cache/cgroup/sock_inode_cache(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/kmalloc-64/cgroup/kmalloc-64(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/kmalloc-64/cgroup/kmalloc-64(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/radix_tree_node/cgroup/radix_tree_node(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/radix_tree_node/cgroup/radix_tree_node(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/dentry/cgroup/dentry(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/dentry/cgroup/dentry(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/proc_inode_cache/cgroup/proc_inode_cache(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/proc_inode_cache/cgroup/proc_inode_cache(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/:A-0000064/cgroup/anon_vma_chain(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/:A-0000064/cgroup/anon_vma_chain(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/anon_vma/cgroup/anon_vma(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/anon_vma/cgroup/anon_vma(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/:a-0000104/cgroup/buffer_head(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/:a-0000104/cgroup/buffer_head(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/mm_struct/cgroup/mm_struct(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/mm_struct/cgroup/mm_struct(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/kmalloc-4k/cgroup/kmalloc-4k(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/kmalloc-4k/cgroup/kmalloc-4k(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/kmalloc-32/cgroup/kmalloc-32(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/kmalloc-32/cgroup/kmalloc-32(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/inode_cache/cgroup/inode_cache(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/inode_cache/cgroup/inode_cache(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/kmalloc-512/cgroup/kmalloc-512(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/kmalloc-512/cgroup/kmalloc-512(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/shmem_inode_cache/cgroup/shmem_inode_cache(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/shmem_inode_cache/cgroup/shmem_inode_cache(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/skbuff_head_cache/cgroup/skbuff_head_cache(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/skbuff_head_cache/cgroup/skbuff_head_cache(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/:A-0000040/cgroup/pde_opener(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/:A-0000040/cgroup/pde_opener(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/:A-0000256/cgroup/filp(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/:A-0000256/cgroup/filp(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/:A-0000208/cgroup/vm_area_struct(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/:A-0000208/cgroup/vm_area_struct(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/squashfs_inode_cache/cgroup/squashfs_inode_cache(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/squashfs_inode_cache/cgroup/squashfs_inode_cache(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/ext4_inode_cache/cgroup/ext4_inode_cache(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/kernel/slab/ext4_inode_cache/cgroup/ext4_inode_cache(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/:A-0000128/cgroup/pid(841:snap-telegram\x2ddesktop-3544.mount)
    /sys/kernel/slab/:A-0000128/cgroup/pid(828:snap-telegram\x2ddesktop-3530.mount)
    /sys/fs/cgroup/devices/snap.telegram-desktop.telegram-desktop
    /sys/fs/cgroup/devices/system.slice/snap-telegram\x2ddesktop-3530.mount
    /sys/fs/cgroup/devices/system.slice/snap-telegram\x2ddesktop-3544.mount
    /sys/fs/cgroup/pids/system.slice/snap-telegram\x2ddesktop-3530.mount
    /sys/fs/cgroup/pids/system.slice/snap-telegram\x2ddesktop-3544.mount
    /sys/fs/cgroup/blkio/system.slice/snap-telegram\x2ddesktop-3530.mount
    /sys/fs/cgroup/blkio/system.slice/snap-telegram\x2ddesktop-3544.mount
    /sys/fs/cgroup/cpu,cpuacct/system.slice/snap-telegram\x2ddesktop-3530.mount
    /sys/fs/cgroup/cpu,cpuacct/system.slice/snap-telegram\x2ddesktop-3544.mount
    /sys/fs/cgroup/memory/system.slice/snap-telegram\x2ddesktop-3530.mount
    /sys/fs/cgroup/memory/system.slice/snap-telegram\x2ddesktop-3544.mount
    /sys/fs/cgroup/freezer/snap.telegram-desktop
    /sys/fs/cgroup/systemd/system.slice/snap-telegram\x2ddesktop-3530.mount
    /sys/fs/cgroup/systemd/system.slice/snap-telegram\x2ddesktop-3544.mount
    /sys/fs/cgroup/unified/system.slice/snap-telegram\x2ddesktop-3530.mount
    /sys/fs/cgroup/unified/system.slice/snap-telegram\x2ddesktop-3544.mount
Samuel Osoba avatar
cn flag
Having inspected the path log, I found traces to snap and I figured that it might have been installed using snap and not that it came with the OS during install like I presumed, hence, I found a command for removing SNAP installed apps: ```sudo snap remove telegram-desktop``` and that returned a successful removal result. At this point, I no longer have on the list of general apps on my PC, which is a good progress.
Samuel Osoba avatar
cn flag
After the removal, there was one more observation that was not satisfactory for me; I tried to run this command <br/> ```find / -iname "*telegram*" 2>/dev/null```<br/> again just to see if there were directories or files left-over on the PC from the app I just removed; which returned some list of paths, though not as long as the previous.<br/> Now, I will appreciate any for cleaning up my PC from all of the left-overs of files for this already removed app.?
ChanganAuto avatar
us flag
Correct. Although the system have now many snaps installed by default (and likely many more to come in the future), Telegram desktop is not one of them, it was installed by you or any other authorized user. That you "can't login" is the part that makes no sense because you aren't supposed to, in the desktop app. You're supposed to login in your phone!
Samuel Osoba avatar
cn flag
Telegram support the function of login on your desktop without a smartphone, a code is automatically sent your mobile phone, which when supplied log you in successfully into the app. It works that way on my windows PC.
ChanganAuto avatar
us flag
Yes, so what didn't work exactly? I've been using it for years and it never failed.
Samuel Osoba avatar
cn flag
I put in my phone no. and the sms never delivers on my mobile, though I have already uninstalled it now.
Score:0
pl flag

I believe you should simply try a sudo snap remove telegram-desktop or sudo snap remove --purge telegram-desktop to remove its settings as well.

Then, go ahead and manually remove ~/Downloads/Telegram Desktop. It really should be this simple

Samuel Osoba avatar
cn flag
Any ideas for removing the left over files displayed in terminal when I run this command `find / -iname "*telegram*" 2>/dev/null` it returns a list of file paths, though not as long as the previous result before it was removed.?
alfx avatar
pl flag
could you please provide the list of file paths?
Samuel Osoba avatar
cn flag
Thank you. ```/var/lib/snapd/sequence/telegram-desktop.json /snap/wormhole/349/lib/python3.8/site- packages/tqdm/contrib/__pycache__/telegram.cpython-38.pyc /snap/wormhole/349/lib/python3.8/site-packages/tqdm/contrib/telegram.py *** /sys/fs/cgroup/freezer/snap.telegram-desktop ``` Many more lines, but that's the pattern.
alfx avatar
pl flag
these are all temporary or cache files produced by apps other than Telegram Desktop like `snapd` and `wormhole`. You can go ahead and delete them manually. Have you tried `sudo snap remove --purge $PACKAGE`? this command removes unused Snap settings which might help
Samuel Osoba avatar
cn flag
I guess it's completely removed from the uninstallation I already did. Thanks, I had already uninstalled it using the command you mentioned prior. Thanks again for your time.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.