Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
$ als gewone gebruiker# als root (of met sudo)
The quick answer
Step by step
- See what is open — security updates and their severity:
dnf updateinfo summary
dnf updateinfo list --security --sec-severity=Critical
dnf updateinfo info RHSA-2026:1234On Ubuntu, apt list --upgradable lists all updates; the ones from the -security pocket are the security fixes.
- Plan it: test on a staging server first, take a snapshot or backup of important servers, tell the users, and set a silence in monitoring for the window.
- Install:
--security = only security fixes (smallest change); a full upgrade brings everything (also bug fixes and new minor versions).
- Restart what needs it:
dnf needs-restarting -r
Reboot is required to fully utilize these updates.
dnf needs-restarting -s
systemctl restart nginx-r = is a reboot needed (kernel, glibc, systemd)? -s = which services use old libraries. On Ubuntu, needrestart does this after apt.
- Reboot cleanly (when needed) and check the new kernel:
- Automate security updates — at least on simple servers:
[commands]
upgrade_type = security
apply_updates = yesdnf -y install dnf-automatic
systemctl enable --now dnf-automatic.timer
apt-get install -y unattended-upgrades
dpkg-reconfigure -plow unattended-upgradesReboots stay a planned decision (or a scheduled window). For many servers use Ansible, Satellite/Landscape, or the cloud's patch manager.
Check that it worked
Common problems
| Problem | Cause | Fix |
|---|---|---|
dnf updateinfo shows nothing on Rocky/Alma for a long time | Errata info depends on the repo. | Check repos are enabled; compare with the vendor's advisories. |
This system is not registered (RHEL) | No subscription → no updates. | rhc connect / subscription-manager register. |
| Service broke after the update | A new version changed behaviour. | dnf history undo ID / reinstall the old version; test on staging next time. |
Kernel updated, still old uname -r | No reboot yet. | Reboot in the window (or live patching for urgent kernel CVEs). |
apt held packages | Dependencies or pinned versions. | apt-mark showhold; plan the change. |
| Disk full during update | /var or /boot full. | Clean old kernels (dnf remove --oldinstallonly), free /var/cache. |
Go further
- Command pages: dnf, systemctl, uname.
- Next how-tos: Install a package on many servers with Ansible, Check disk space, Find files with risky permissions, Find which package owns a file, Register a RHEL server and enable repositories.
- Learn it: RHCSA — Update packages, RHCSA — dnf history, RH124 — dnf history.
- Audit tools: Lynis, OpenSCAP.
1Which command shows if a reboot is needed after updates on RHEL?
2What is the difference between dnf upgrade --security and dnf upgrade?
The first installs only security fixes; the second installs all available updates.