2

I've uninstalled a snap app using "ubuntu softwares" and it removed all my relevant user data from /home/$USER/snap/appname as I've heard snap makes a snapshot of this data before removing it. Since the app we're talking about is no longer available as a snap, reinstalling it is not an option. So having said all that, where do I find the snapshot of my userdata snappy made? Thank you for your reply in advance.

Imre
  • 121
  • 1
  • 3

1 Answers1

1

When you uninstall a snap, a snapshot that contains a copy of your user, system and configuration data is automatically created, and will be retained for 31 days before being automatically removed. This data is stored in a zip file under the directory /var/lib/snapd/snapshots.

Use the snap saved command to list saved snapshots. The first column indicates the ID of the snapshot. All snaps for which a snapshot was taken on a specific time will share the same ID. The "auto" annotation in the last column of the output indicates that the snapshot was automatically created. You can restore a snapshot with snap restore ID.

See the documentation for more information on snapshots.

vanadium
  • 98,427
  • I didn't mention the restore part because the snap no longer exists, according to OP. But, otherwise, for existing snaps, restore definitely would help. – DK Bose May 30 '20 at 12:17
  • 1
    @DKBose on deleting a snap, a snapshot is automatically created and kept for 31 days, so can be restored within that period even if the snap is gone – vanadium May 30 '20 at 12:21
  • What I don't know / did not know is whether restore works even if the snap no longer exists. That a snapshot is saved is clear (unless --purge is used). – DK Bose May 30 '20 at 12:29
  • 1
    Yes it does. It places the files back under ~/snap/appname, even if the app itself is not anymore installed (and even if ~/snap/appname was removed) – vanadium May 30 '20 at 13:08