On a Ubuntu 20.04 machine, when I ssh in I see
59 updates can be applied immediately.
1 of these updates is a standard security update.
To see these additional updates run: apt list --upgradable
Now, I'd like to install only the "standard security update".
I have tried with unattended-upgrade
(sudo unattended-upgrade -d
) but I get
...
Fetched 0 B in 0s (0 B/s)
fetch.run() result: 0
Packages blacklist due to conffile prompts: []
No packages found that can be upgraded unattended and no pending auto-removals
...
From my online research unattended-upgrade
is the way to install security updates.
What am I missing here?
Is it because the security update is a "standard" one?
UPDATE 1
~$ sudo apt list --upgradable | grep security |cut -d\/ -f1|xargs sudo apt-get install -y
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.
sudo apt update
. since that command does fire up aptdaemon. It's misleading because that number does NOT include Snaps nor pips nor flatpaks nor AppImages nor wheels or compiled software. And Unattended Upgrades will handle the deb security updates anyway; the point of the number is that you only need to get involved if the number is shockingly large. – user535733 Aug 09 '21 at 14:12motd
was reliable. However, I now understand that is not the case. Should we trustunattended-upgrade
to install all security updates regardless whatmotd
says? – Sig Aug 09 '21 at 14:18/var/log/unattended-upgrades/unattended-upgrades.log
. The default setting for that log is to rotate monthly and to keep old logs for 6 months. With those package names in hand, you can pull the apt-changelog for each package, which will give you the CVEs that were patched. Then, when your auditor names a CVE, you have a back-trail to the package-name and the date-of-install for the patch. Alternately, you can also pull that CVE back-trail from https://ubuntu.com/security and avoid maintaining a spreadsheet. – user535733 Aug 09 '21 at 14:30