Ubuntu 21.4, how to update everything from the command line?
Just wondering... To update my system, I normally run sudo apt update
followed by sudo apt upgrade
if necessary. I believe this should keep my system reasonably up-to-date. However, these commands do nothing with the snap
system. I have a desktop item that I have named updates
, that runs the command update-manager
. When I click on that item, I get a message telling me it's checking for updates, often followed by a message mentioning snaps. What am I missing? I thought the snap system was supposed to autoupdate without me doing anything. The man page for update-manager
mentions nothing about snaps, so I am a bit confused. Anyone who knows?
UPDATE:
As asked, the output of sudo grep storehelpers /var/log/syslog
is just this line repeated:
Aug 6 14:08:43 puta snapd[613]: storehelpers.go:551: cannot refresh: snap has no updates available: "core18", "gnome-3-34-1804", "gtk-common-themes", "snap-store", "snapd"
Guess my question was not precise enough – what I want to know is if the two apt lines I mentioned is enough to keep my system up-to-date!
Solution 1:
For most users, no action at all is needed to keep their Ubuntu system safely up-to-date.
- Unattended Upgrades installs security patches in Deb packages.
- Non-security Deb upgrades are optional.
- Snapd automatically checks for and installs upgrades up to four times each day.
For your specific question, the only additional action your script does is to install those optional non-security Deb package upgrades. It might take credit for doing some security and snap upgrades a few hours before the automated tools would have handled those anyway.
So sure, tell your script that it's doing a great job and bake it a cake.
An alternative way to accomplish the same thing from the shell, with additional useful output:
sudo apt update
sudo apt full-upgrade
sudo snap refresh