A snapshot is a copy of the user, system and configuration data stored by snapd for one or more snaps on your system.
Snapshots are generated with the
snap save command and can be used to backup the state of your snaps, revert snaps to a previous state, or restore a fresh snapd installation to a previously saved state.
Snapshots require snap version 2.37+.
snap save command creates a snapshot for all installed snaps, or if declared individually, specific snaps:
$ sudo snap save Set Snap Age Version Rev Size Notes 30 core 1.00s 16-2.37~pre1 6229 250B - 30 core18 886ms 18 543 123B - 30 go 483ms 1.10.7 3092 387B - 30 vlc 529ms 3.0.6 770 882kB -
Each snapshot has a unique ID, or revision, shown in the Set column above. This value is unique to each save operation, regardless of the number of snaps it includes. Age is the period of time since the snapshot was created, while Version and Rev refer to the specific snap at the time of the snapshot. Size is the amount of storage used by a snapshot.
ⓘ If you’d rather not wait for the save operation to complete before regaining access to your terminal, add the
You can see the state of your system’s snapshots with the
snap saved command. Adding
--id=<Set/unique ID> allows you to query a specific snapshot:
$ snap saved --id=29 Set Snap Age Version Rev Size Notes 29 vlc 2h41m 3.0.6 770 882kB -
To verify the integrity of a snapshot, use the
$ snap check-snapshot 30 Snapshot #30 verified successfully.
restore command replaces the current user, system and configuration data with the corresponding data from the specified snapshot:
$ snap restore 30 Restored snapshot #30.
By default, this command restores all the data for all the snaps in a snapshot. You can restore data for specific snaps by simply listing them after the command, and for specific users with the
Excluding a snap’s system and configuration data from snap restore is not currently possible.
forget command deletes a snapshot. This operation removes a snapshot from local storage and can not be undone:
$ snap forget 30 Snapshot #30 forgotten. $ snap saved --id=30 No snapshots found for that ID.
By default, this command deletes all the data for all the snaps in a snapshot. You can delete the data for specific snaps by listing them after the command.
Snapshots are stored as a zip file for each snap, and each zip file contains the following:
On Ubuntu-based systems, snapshots are stored in the