Optanik
  1. Home
  2. Learn
  3. Linux patch management

Patching

Linux patch management: a practical guide

How to keep Linux servers and desktops patched: apt and dnf, security-only updates, automatic updates, kernel reboots and checking what needs a restart.

By Adam King, Founder & CEO · Updated 2026-12-01 · 3 min read

Linux makes installing updates easy: one package manager updates the operating system and most of the software on it. What makes Linux patching hard is scale and timing. Servers can't restart whenever they like, kernel updates need a reboot to take effect, and a fleet of different distributions all behave slightly differently.

Patch management in Linux, in short

Patch management in Linux means keeping every server and desktop's packages current through its package manager: apt on Debian and Ubuntu, dnf on Fedora, RHEL, Rocky and Alma, and zypper on SUSE. A working routine installs security updates on a schedule, waits a few days on workstations before updating servers, restarts inside a maintenance window when the kernel or core libraries change, and checks that every machine actually finished. Across more than a few machines, an RMM tool with Linux patching does those steps for you and shows which machines are behind.

How updates work on the main distributions

Debian and UbuntuRHEL, Rocky, Alma and Fedora
Package manageraptdnf
Refresh and upgradeapt update then apt upgradednf upgrade
Security updates onlyThrough unattended-upgrades or the security repositorydnf upgrade --security
Automatic updatesunattended-upgradesdnf-automatic
Does it need a restart?/var/run/reboot-required existsdnf needs-restarting -r

Security updates vs everything

Distributions mark security updates separately. On servers, many teams install security updates automatically and leave other updates for a planned window, because a non-security update is more likely to change behavior. On desktops, installing everything on a schedule is usually fine.

Kernels and restarts

A new kernel only runs after a restart. Until then, the machine is still running the old, vulnerable one, even though the package shows as updated. Libraries work the same way: services keep using the old version in memory until they restart. Tools like needrestart (Debian and Ubuntu) and dnf needs-restarting (RHEL family) show which services need a restart. Live kernel patching services can apply some kernel fixes without a reboot, but you still need regular restarts.

A sensible routine for a Linux fleet

  1. Separate servers from desktops and give servers their own maintenance window.
  2. Install security updates on servers weekly, after a short soak, and everything else monthly.
  3. Restart in the window when a reboot is required, in an order that respects dependencies (database first, then the apps that use it).
  4. Hold packages deliberately. If a package must stay on a version, hold it and write down why and until when.
  5. Watch distribution end of life. An unsupported release gets no more security updates, so no amount of patching keeps it safe; plan the upgrade.
  6. Report compliance per distribution, so a forgotten box running an old release stands out.

Doing it across many machines

SSH loops and configuration management tools work, but they need you to build the scheduling, reporting and exception handling yourself. An RMM that understands Linux does that for you alongside your Windows and Mac machines.

Patching Linux with Optanik

Optanik patches Linux operating systems and common third-party apps on a schedule, inside a maintenance window, after a soak period, with a compliance number just for Linux. It also gives you SSH in a browser tab with no port 22 open to the internet, DEB and RPM deployment, and live CPU, memory and disk monitoring. See Linux RMM.

What to patch this month: the Linux security updates tracker lists every recent Ubuntu notice and Critical or Important Red Hat CVE, with kernel updates and exploited flaws first.

Related reading: What is patch management? and patch management best practices.

Free for 30 homelab machinesStart free on one machine

See it on a real fleet, then try it on yours.

Open the live demo with nothing to install, or create a free account and add one machine. $2 per endpoint when you license a fleet.

Try the live demo Create a free account Compare plans Watch a tutorial