Package updates are waiting
- Check
updates.pending- Severity
- medium
- Runs
- on the server, in the daily run of the agent
- Looks at
- Upgradable packages, and which of them are security updates where the package manager marks them
What the check looks at
The packages that have a newer version in the configured repositories, from the package manager
(apt-get -s dist-upgrade, dnf check-update, apk version -l '<'), and which of them are security updates
where the package manager can tell: on Debian and Ubuntu the packages from the security repository, on the RHEL
family the packages of security advisories. The check fails when at least one security update waits, and warns
when only other updates wait.
Risk
Security updates pile up when automatic updates are off or failing, or when packages are held back. The other updates carry bug fixes, and a long backlog makes the next upgrade bigger and harder to test.
How to fix it
Debian and Ubuntu
sudo apt update
apt list --upgradable
sudo apt upgrade
apt list --upgradable shows the repository of each package, for example bookworm-security. Packages that
apt upgrade keeps back need new dependencies; check what one pulls in, then run sudo apt install <package>.
apt-mark showhold lists the packages held on purpose.
RHEL, Rocky Linux and AlmaLinux
sudo dnf check-update --security
sudo dnf updateinfo list --security
sudo dnf upgrade --security # only security updates
sudo dnf upgrade # everything
dnf check-update exits with code 100 when updates are available.
Alpine
sudo apk update
apk version -l '<'
sudo apk upgrade
After a kernel, glibc or OpenSSL update, services may need a restart and the server a reboot; the reboot guide shows how to tell.
How to check the fix
Run the listing command again. It must show nothing, or only the packages you hold back on purpose.
When a warning is fine
A few updates between a release by the distribution and your next update run; with automatic updates on, they are gone the next day. A package held back for a reason, such as a database major version you upgrade by hand, when the reason is written down and its security fixes reach the server another way.
Sources
- apt(8) (
list --upgradable,upgrade) - dnf(8): check-update (exit code
100,
updateinfo,--security) - Alpine user handbook: apk