Restore Lost Telegram Account via Snap

Dear all,

I have lost access to my telegram account in Ubuntu 18.04. I can see that there is a snap version (4889) which preceeds the current version (4899) in the folder /var/lib/snapd/snaps. Reverting to this version might still allow me to login to my account without needing access to the original phone number (correct me if I’m wrong!) since I see that the date last modified is previous to my losing access.

However I am at a loss as to be able to try and recover my lost account knowing that the information might well be contained in this snap. I am not allowed to copy and paste this snap version’s info out of the above folder… apparently I do not own it. Also, I have no idea where I would need to paste it to anyway ;0

When I do the command snap list I get this version of telegram: telegram-desktop 4.8.10 4899 latest/stable telegram-desktop

I would be so happy to recover my account given that I do not have access to the phone number with which I signed up for the account.

Your help is hugely appreciated!!

Thanks in advance

You can run sudo snap revert telegram-desktop to revert the app back to the previous version. This’ll also revert user data that exists in the user versioned folder ($HOME/snap/telegram-desktop/current) which is where your credentials are actually likely stored. Reverting will also blacklist the revision you were on from automatic updates and only update to a new revision when that’s released in the future.

There’s a mild chance the credentials might be in the unversioned user data ($HOME/snap/telegram-desktop/common) which reverting doesn’t roll-back, but this is quite unlikely, if it is the case, then I’d imagine the data is unfortunately lost.

Dear James,

Many thanks for your kind response. I have done this command revert, and it did indeed work to revert back to 4.8.7. But, when I click on my telegram app icon, it still shows me the screen to sign up as if I were a new user.

However, the folder which you mention $HOME/snap/telegram-desktop does not appear! The other snaps like e.g. signal-desktop and gnome-calculator are there, but nothing for telegram. Does that mean what I think it does?

However, there is data about telegram-desktop from before the data loss which I have found in the var/lib/snapd/snaps folder. Is the info contained within this folder able to contain my account data? The file is simply called telegram-desktop_4887.snap. There is no common folder found here, just that .snap file.

Nonetheless, in the other snap folder which I browse to under /snap/telegram-desktop/4887 (which is different to the HOME folder I believe) there is indeed more information under folders which are the following: bin, dev, etc, lib, meta, sbin, snap, usr, var . Plus there is a file called flavor-select.

Could there be some way that my info is stored within this folder 4887? Since the date modified is before the data loss.

Thanks so much for your input James!

All the best :slight_smile:

Is there anything under /root/snap/telegram-desktop ?

Hi Ruhan,

Umm, I do not have permission to view this folder. How can I do it? I am not very good at Linux :wink:

Simple. If you have root access/superuser access, you will be able to view the folder with superuser.

sudo su

sudo ls /root/snap/telegram-desktop etc. If there’s anything in there, you could probably copy the contents over to your home folder and then changing the ownership to your username, then you should be able to access it.

Hi Ruhan,

When I enter your commands in the terminal, it does show 4 folders - 4887, 4899, common, current.

When I try to look into these folders it seems they are empty. Could that be something hiding the contents? Should I try to copy over the folder over to my home folder in any case? Also, how would I change the ownership to my username? Sorry, I know close to nothing.

Thanks for your help!

Hi Ruhan,

Any ideas about other solutions? Thanks

Hi there. Apologies for the late response, no, I dont have any other solutions I can think of, sorry.