Problem Description:
I was looking around, found “Disk Usage Analyzer”, and noticed I have multiple installs of Firefox and Thunderbird. I thought the new always installs and replaces the old. Why not in Ubuntu Linux?
What I’ve Tried:
Did not want to mess things up. Not afraid of doing multiple uninstalls. It seems like Ubuntu Linux has several different ways of installing stuff, which don’t overlap, but do in other ways. It is confusing, retarded, and not efficient. This seems to be a problem whenever a new program or update comes out. Also, program pages sometimes have their own way of installing or updating, which is not always the same as Ubuntu Linux. There is “snap”, “pip”, “App Center”, and “Software”, maybe more, plus sometimes you go to command line terminal prompt, sometimes a downloaded installer, and sometimes other ways.
To developers: Please try to not have such a scatterbrained way of installing or updating programs. It will go a LONG WAY to helping people AND your program’s success.
Firefox, Thunderbird are shown as snap packages. When you update a snap package, the previous version is retained in case you need to rollback to the previous one.
I do not plan to “rollback” on Firefox, and have not yet set up Thunderbird, so have no intent on rolling back that either. I’d like to start clean, and with only one version in play. I’ve already had mess-ups on the Notepad++ install, so don’t want to repeat that.
The default might be 3 total (so 2 older versions are kept). There is probably a command to change how many are retained. You would have to look the command up. Try asking in Google and engage its AI.
Managing Retained Versions: Snap retains a default number of older revisions, and you can adjust this setting using the refresh.retain option to manage disk space usage according to your needs.
Did you notice that one set is in a different location?
Also, where is this “refresh.retain” option located? Still kind of new to this (a month or two) system.
To manage the number of snap revisions retained on your system, use the command snap set system refresh.retain=N, where N is the desired number of revisions (must be 2 or greater). You can also manually remove old snap revisions using snap remove --revision=<revision_number> <snap_name and revert to a previous version with snap revert <snap_name.
Use command snap list --all for a complete list of your snaps
You can’t reduce the number of saved versions to less than 2
corrado@corrado-ns3-qq-0705:~$ snap set system refresh.retain=1
error: cannot perform the following tasks:
- Run configure hook of "core" snap (run hook "configure": retain must be a number between 2 and 20, not "1")
corrado@corrado-ns3-qq-0705:~$
to know how many copies you will keep: snap get system refresh.retain
Interesting. Is the change immediate? In other words, if I changed that setting, does it delete the oldest one of the 3, which is in a slightly different location? I might like to do this, then put the setting back to the way it was once again, just so it is more consistent.
Thank you.
It seems the command: ‘snap get system refresh.retain’ works only after set command:
corrado@corrado-n03-plucky:~$ snap get system refresh.retain
error: snap "core" has no "refresh.retain" configuration option
corrado@corrado-n03-plucky:~$ snap set system refresh.retain=1
error: cannot perform the following tasks:
- Run configure hook of "core" snap (run hook "configure": retain must be a number between 2 and 20, not "1")
corrado@corrado-n03-plucky:~$ snap set system refresh.retain=3
corrado@corrado-n03-plucky:~$ snap get system refresh.retain
3
corrado@corrado-n03-plucky:~$
The default for this setting is 2 … you can try the snap unset command for it though … BTW, see snap help and snap help <command> for more info about such commands
You can use the command ```
snap set system refresh.retain=n
multiple times, changing the number of copies saved;
corrado@corrado-ns3-qq-0705:~$ snap get system refresh.retain
3
corrado@corrado-ns3-qq-0705:~$ snap set system refresh.retain=2
corrado@corrado-ns3-qq-0705:~$ snap get system refresh.retain
2
corrado@corrado-ns3-qq-0705:~$ snap set system refresh.retain=5
corrado@corrado-ns3-qq-0705:~$ snap get system refresh.retain
5
corrado@corrado-ns3-qq-0705:~$ snap set system refresh.retain=2
corrado@corrado-ns3-qq-0705:~$ snap get system refresh.retain
2
corrado@corrado-ns3-qq-0705:~$
And as I said above (as for all snap settings and as explained in the help I pointed to) the unset command will return it to its default …
ogra@styx:~$ sudo snap get system refresh.retain
Error: snap "core" has no "refresh.retain" configuration option
ogra@styx:~$ sudo snap set system refresh.retain=20
ogra@styx:~$ sudo snap get system refresh.retain
20
ogra@styx:~$ sudo snap unset system refresh.retain
ogra@styx:~$ sudo snap get system refresh.retain
Error: snap "core" has no "refresh.retain" configuration option
ogra@styx:~$