Score:4

Do snap files get larger?

ru flag
dan

I noticed with disc analyzer that my disk free space is gone down from 974 GB to 971 GB over time on system updates and my snaps folder went from 1 GB to 3 GB.

Do system snaps get larger as system updates get newer?

Score:8
in flag

Old versions of snaps are retained by the system but you can remove them and control what goes on behind the scenes.

The default number of versions retained is 3 but there is a snap option to use in terminal to reduce that to 2:

sudo snap set system refresh.retain=2

and you can write a script to remove old snap revisions.

This reference shows you how.

Levente avatar
cn flag
"The default number of versions retained is 3" — just as a clarification: here 3 means the one being used currently and two previous older versions, right? So `refresh.retain=2` would mean: current, and only one previous instance, right?
24601 avatar
in flag
The linked reference answers that with "to set the maximum number of a snap's revisions stored by the system after the next refresh".
Levente avatar
cn flag
I can't figure it out even from that whole sentence... (Update: if I _had to_ guess, I would say "revisions" mean only old versions, and the current one does not count in "revisions"...)
wizardpurple avatar
cn flag
@Levente Revisions include the latest and previous snap. You should be able to check by comparing the results of ```snap list``` and ```snap list --all``` and looking at the 'Rev' column. ```snap list``` will show you the latest/currently in use version, or 'revision', or each of your snaps. ```snap list --all``` shows the latest and previous revisions. If you use the ```refresh.retain=2``` option, you should have 2 of each snap: the latest revision, and one previous revision.
Levente avatar
cn flag
@wizardpurple thank you! Now that I see only two of everything, I wanted to see whether my retain value is set to `2` by default. But when I try `sudo snap get system refresh.retain` I get `error: snap "core" has no "refresh.retain" configuration option`. I'm on Ubuntu 20.04.2, snap/snapd is `2.50.1`.
Levente avatar
cn flag
`sudo snap get system refresh` returns literally: `Key Value`
wizardpurple avatar
cn flag
@Levente by default, "refresh.retain=3 on Ubuntu Core systems and refresh.retain=2 on classic Ubuntu systems, such as those running Ubuntu 18.04 LTS (Bionic Beaver) and Ubuntu 16.04 LTS (Xenial Xerus)" ([src](https://snapcraft.io/docs/keeping-snaps-up-to-date)). And it appears that by default, "Options are not visible until after they are set. The snap get command can then be used to check their state" ([system options doc](https://forum.snapcraft.io/t/system-options/87)) which seems very odd that they wouldn't return a default value.
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.