Is it okay to remove earlier versions of snaps?

Almost all of snaps on my system which have duplicates that differ only in version number.

  1. Do the latest snaps depend on the earlier snaps, or is it okay to delete the earlier snaps?
  2. If it's okay to delete the earlier snaps, is there a command that will take care of this like apt autoclean and apt autoremove?

Here's an example of the duplication. Some of the snaps appear to differ by major-version number; others appear to differ only by minor-version number.

wine-platform-3-stable_10.snap
wine-platform-3-stable_11.snap
wine-platform-5-stable_13.snap
wine-platform-5-stable_16.snap
1

1 Answer

You can set the maximum number of snap revisions stored for each package by setting the refresh.retain option. The refresh.retain option can only be an integer between 2 and 20 and has a default value of 3. source

It's OK to remove earlier versions of snap packages down to the minimum number of saved snap revisions of 2. The following command changes the number of saved snap revisions from the default value of 3 to 2.

sudo snap set system refresh.retain=2 
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like