Back to Blog
Linux Patch Management: A Practical Process for Ubuntu, Debian and RHEL

Linux Patch Management: A Practical Process for Ubuntu, Debian and RHEL

GB Wise18 November 202610 min read

Linux patch management is the routine of finding, testing, installing, and verifying updates across your servers on a predictable schedule. On Ubuntu and Debian that means apt and unattended-upgrades; on RHEL and its rebuilds it means dnf and dnf-automatic. The tools are simple. The hard part is the process around them: knowing what you run, deciding what to patch first, rolling changes out in stages, and proving that the updates are actually live.

This guide sets out a process that works for a fleet of a few servers or a few hundred.

Key takeaways

  • Start with an inventory: every server, its distribution, its release, and its end-of-life date.
  • Automate security updates where you can, but stage them: test servers first, then production.
  • Prioritize by exploitability. Fixes for vulnerabilities in CISA's Known Exploited Vulnerabilities catalog come first.
  • An update isn't finished until the service is restarted or the server is rebooted, and you've verified the new version is running.
  • Track release end-of-life dates, because an unsupported release can't be patched at all.

Why Linux patching needs a process

NIST describes patching as routine preventive maintenance rather than an emergency activity, and recommends an organization-wide strategy to make it manageable (NIST SP 800-40 Rev. 4, April 2022). In practice, unpatched Linux servers usually come from gaps in process rather than missing tools:

  • Servers nobody remembered existed
  • Updates installed but services never restarted, so the old library stays in memory
  • Automatic updates disabled after one bad upgrade and never re-enabled
  • Releases that went past end-of-life and stopped receiving fixes

Step 1: Build an inventory

You can't patch what you don't know about. For each server, record:

  • Hostname and role (web, database, file, hypervisor)
  • Distribution and release, for example Ubuntu 24.04, Debian 12, or RHEL 9
  • Kernel version
  • Who owns it, and its maintenance window
  • The release's end-of-life date
These commands give you the basics on any of the three distributions:
cat /etc/os-release
uname -r
uptime

Configuration management tools such as Ansible can collect this across the whole fleet in one run.

Step 2: Decide what to patch first

Not every update is equally urgent. A workable order is:

  1. Actively exploited vulnerabilities: anything in the CISA Known Exploited Vulnerabilities catalog. CISA recommends that organizations use the catalog as an input to their vulnerability management prioritization.
  2. Critical and high-severity security updates on internet-facing servers.
  3. Remaining security updates on internal servers.
  4. Bug fixes and feature updates, in the regular maintenance window.
If you hold or plan to hold Cyber Essentials certification in the UK, high-risk and critical updates must be installed within 14 days of release. For accounts created after 26 April 2026, missing that deadline fails the assessment automatically (IASME).

Step 3: See what's pending

Ubuntu and Debian

sudo apt update
apt list --upgradable

RHEL, Rocky Linux and AlmaLinux

sudo dnf check-update
sudo dnf updateinfo list --security

dnf updateinfo separates security advisories from other updates, which helps when you only want to apply security fixes between maintenance windows.

Step 4: Automate security updates

Ubuntu and Debian: unattended-upgrades

sudo apt install unattended-upgrades
sudo dpkg-reconfigure --priority=low unattended-upgrades

By default it installs updates from the security pocket only. Check /etc/apt/apt.conf.d/50unattended-upgrades to confirm which origins are allowed, whether automatic reboots are enabled, and where reports are emailed. Then do a dry run:

sudo unattended-upgrade --dry-run --debug

RHEL: dnf-automatic

sudo dnf install dnf-automatic
sudo systemctl enable --now dnf-automatic.timer

In /etc/dnf/automatic.conf, set upgrade_type = security to limit automatic installs to security advisories, and apply_updates = yes to install rather than just download.

Step 5: Stage the rollout

Automatic updates are safest when they don't hit every server at once:

  • Ring 0, test: non-production copies of your main workloads, updated first
  • Ring 1, low-risk production: redundant or easily rebuilt servers, a few days later
  • Ring 2, critical production: databases and single points of failure, in a maintenance window with a rollback plan
Before patching critical servers, take a snapshot if they're virtual machines. On a hypervisor such as Proxmox VE this takes seconds and gives you a fast way back if an update breaks something.

Step 6: Restart services and reboot

Installing an updated library doesn't protect running processes that still use the old one. After updates:

  • On Ubuntu and Debian, needrestart lists services running outdated code, and can restart them
  • On RHEL, dnf needs-restarting -r reports whether a reboot is required, and dnf needs-restarting -s lists services to restart
  • Kernel updates need a reboot, unless you use a live-patching service such as Canonical Livepatch or kpatch on RHEL
# Ubuntu / Debian
[ -f /var/run/reboot-required ] && cat /var/run/reboot-required

# RHEL family
sudo dnf needs-restarting -r

Schedule reboots in the maintenance window rather than letting them pile up. A server with 400 days of uptime is usually a server running an old kernel.

Step 7: Verify and record

Close each cycle by checking that the updates are really in place:

  • Confirm the package versions changed: apt policy <package> or rpm -q <package>
  • Confirm the running kernel matches the installed one: uname -r
  • Check the application still works, not just that the server responds to ping
  • Record what was patched, when, and any failures
That record is what auditors, insurers, and certification bodies ask for, and it's what tells you when a server has quietly stopped updating.

Step 8: Plan for end-of-life

An unsupported release can't be patched, however good your process is. Two examples of current life cycles:

Debian stable releases get security support from the Debian security team, followed by a Long Term Support period run by a separate team; check the dates for your release on the Debian website. Plan upgrades at least six months before any end date.

A monthly patch cycle at a glance

WeekTask
ContinuousAutomatic security updates on test and low-risk servers
Week 1Review pending updates and KEV entries; patch test servers
Week 2Patch low-risk production; check for regressions
Week 3Patch critical production in the maintenance window; reboot as needed
Week 4Verify versions and kernels; record results; review end-of-life list
Actively exploited vulnerabilities skip the queue and go out as soon as they're tested.

Frequently asked questions

Should I enable automatic updates on production Linux servers?

For security updates, usually yes, as long as you stage them and test first. Limit automatic installs to security updates, and keep feature updates and major upgrades for planned maintenance.

How often should Linux servers be rebooted?

Whenever a kernel or core library update requires it, which in practice is often monthly. If uptime matters, use live patching for the kernel and design services so one server can reboot without an outage.

Is apt upgrade or apt full-upgrade safer?

apt upgrade never removes packages, so it's the safer default for routine patching. apt full-upgrade can remove packages to resolve dependencies and is better kept for planned maintenance.

Get help with Linux patching

Our Linux administration service runs this process for Ubuntu, Debian, and RHEL fleets, with monthly reports on patch status and end-of-life dates. For the wider routine around it, see the IT administration checklist.