The script /etc/update-motd.d/90-updates-available provides a summary of system updates, for example:

281 packages can be updated.
209 updates are security updates.

Is there any way to list this 209 security updates?

Apparently, this script comes from /usr/lib/update-notifier/update-motd-updates-available but I can't find any clue about where is it taking the values.

I thought the list could be taken from the command apt list --upgradable, but I don't find a coincidence between the number of packages when doing grep with the word "security":

apt list --upgradable | grep security | wc -l
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
  • 1
    This doesn’t answer the question in full, but you can see the packages names by running /usr/lib/update-notifier/apt-check -p (this is the tool which generates the motd snippet). That however doesn’t separate security updates from other updates. – Stephen Kitt Oct 15 '19 at 11:47

Your Answer

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

Browse other questions tagged or ask your own question.