SUSE Linux Enterprise Server (SLES) and openSUSE Leap treat patching as a first-class concept distinct from ordinary package upgrades. Rather than simply pushing newer RPMs into a repository, SUSE publishes structured patches (SUSE-SLE-SERVER-...), each bundling the exact package versions that resolve a set of CVEs or bug reports, tagged by category (security, recommended, optional) and severity (low, moderate, important, critical).
On a single SLES host, zypper paired with Btrfs and Snapper gives administrators one of the safest local update and rollback workflows in Linux. Across a mixed fleet of thirty or three hundred servers spanning SLES 15, SLES 16, openSUSE Leap, RHEL, and Ubuntu, the challenge shifts: knowing which hosts have pending security patches, coordinating staged rollouts without deploying a dedicated SUSE Multi-Linux Manager infrastructure, and keeping audit-ready records of every change.
This guide covers the core zypper patch workflow, exit codes 100–107 for automation, zypper ps and needs-rebooting checks, Btrfs/Snapper rollbacks, and how SUSE patching fits into a broader Linux patch management strategy. For the command-order single-host runbook, see the SUSE patching process with zypper.
Four ways to patch SUSE, compared
| Approach | Security-only updates | Staged rollouts | Mixed-distro fleets | Extra license |
|---|---|---|---|---|
| Manual zypper | zypper patch —category security | By hand | No | No |
| zypper with a systemd timer | Yes | Per host only | No | No |
| SUSE Manager | Yes | Channels and stages | SUSE-centric | Yes |
| SysWard | Yes, with CVE context | Groups | Yes, every distro in one fleet | No, priced per agent |
Core SUSE Patching Commands: zypper patch vs zypper update
Before running updates on SLES, confirm that the host is registered with the SUSE Customer Center (SCC) or a local Repository Mirroring Tool (RMT) server. If a module registration expires, zypper only sees the repositories that remain active.
# 1. Verify SLES registration and enabled repositories
sudo SUSEConnect --status-text
sudo zypper repos --uri
# 2. Refresh repository metadata and list pending official patches
sudo zypper refresh
sudo zypper list-patches
sudo zypper list-patches --category security --severity critical,important
# 3. Apply security-only patches, or all official patches
sudo zypper --non-interactive patch --category security
sudo zypper --non-interactive patch
# 4. Patch a specific CVE out of band
sudo zypper list-patches --cve=CVE-2026-12345
sudo zypper --non-interactive patch --cve=CVE-2026-12345
# 5. Check whether a system reboot or service restart is required
sudo zypper needs-rebooting
sudo zypper ps -s
Understanding the difference between zypper patch, zypper update (zypper up), and zypper dist-upgrade (zypper dup) is essential on SUSE:
zypper patch: Reads SUSE’s patch metadata and applies only released maintenance advisories for your current Service Pack. It supports--category security,--severity,--cve, and--bzfilters. By default it does not upgrade packages from third-party repositories that lack patch definitions; pass--with-updateif you want both in a single run.zypper update(zypper up): Upgrades every installed RPM package to the newest version available in enabled repositories without changing package vendor or architecture. Third-party repository updates and SysWard’s package-level upgrades run throughzypper up.zypper dist-upgrade(zypper dup): Aligns installed packages with a new distribution target (such as migrating from SLES 15 SP6 to SP7 or rolling openSUSE Tumbleweed). Never usezypper dupfor routine monthly security patching on SLES.
Non-Interactive Flags and Zypper Exit Codes (100–107)
When running zypper from cron, systemd timers, or configuration management tools, two behaviors catch teams off guard: interactive patches and informational exit codes.
First, some SUSE patches are marked interactive because they require a license agreement, display a critical release note, or flag a reboot. Under zypper --non-interactive patch, interactive patches are skipped by default so unattended runs do not hang on a prompt. To include them during an automated maintenance window, pass --auto-agree-with-licenses and, where appropriate, --with-interactive.
Second, zypper uses exit codes 0 through 7 for normal completion and errors, and 100 through 107 for operational status signals:
| Exit code | Constant | Meaning in automation |
|---|---|---|
0 | ZYPPER_EXIT_OK | Completed cleanly, no further action needed |
100 | ZYPPER_EXIT_INF_UPDATE_NEEDED | patch-check found applicable patches waiting |
101 | ZYPPER_EXIT_INF_SEC_UPDATE_NEEDED | patch-check found security patches waiting |
102 | ZYPPER_EXIT_INF_REBOOT_NEEDED | Updates succeeded; host requires a reboot |
103 | ZYPPER_EXIT_INF_RESTART_NEEDED | Package manager updated itself; re-run zypper patch immediately |
Exit code 103 is particularly important: when SUSE ships an update to libzypp or zypper itself, the first zypper patch installs only the package manager update and exits 103. Any script or systemd service that does not re-run zypper patch on exit 103 leaves the rest of the host’s security patches unapplied until the next cycle.
Reboot Detection and Deleted Library Checks with zypper ps
Updating glibc, openssl, or the kernel on disk does not replace the code already mapped into running processes. SUSE ships two built-in commands to close that gap:
# Exits 102 if kernel, glibc, systemd, or dbus was updated since boot
sudo zypper needs-rebooting ; echo "exit: $?"
# Lists processes still holding deleted files in memory, grouped by systemd unit
sudo zypper ps -s
# Print only the systemd service names so you can restart them directly
sudo zypper ps -sss
zypper ps -sss outputs one service name per line, making it trivial to restart affected daemons (systemctl restart $(zypper ps -sss)) when a shared library like libssl or libexpat is patched and zypper needs-rebooting returns 0.
For mission-critical SAP or database hosts that cannot reboot during kernel CVE cycles, SUSE Linux Enterprise Live Patching (formerly kGraft, now built on upstream klp) patches the running kernel in memory via kGraft/lp packages delivered through the SLE Live Patching module.
Btrfs Snapshots and Instant Rollbacks with Snapper
When SLES or openSUSE Leap is installed with its default Btrfs root filesystem, zypp-plugin-snapper automatically records a pre snapshot before zypper touches the RPM database and a post snapshot when the transaction finishes. Because /var/lib/rpm lives inside the root subvolume snapshot, rolling back restores both the binaries and the package database together:
# List pre/post snapshot pairs created around zypper runs
sudo snapper list --type pre-post
# Diff the files changed between pre-snapshot 28 and post-snapshot 29
sudo snapper status 28..29
# Roll back to pre-snapshot 28 and reboot into the restored state
sudo snapper rollback 28
sudo systemctl reboot
If you only need to hold a single package at its current version while applying the rest of the security patches, lock it with zypper addlock (al):
sudo zypper addlock postgresql16-server
sudo zypper locks
sudo zypper removelock postgresql16-server
Automating SUSE Patching: Systemd Timers vs Fleet Tools
On a standalone SLES server, a two-unit systemd timer (suse-security-patch.service and suse-security-patch.timer) running zypper --non-interactive patch --category security --auto-agree-with-licenses handles daily security advisories cleanly.
At fleet scale, teams typically evaluate SUSE Multi-Linux Manager (formerly SUSE Manager, and its upstream open-source project Uyuni). As detailed in our comparison of the 10 best Linux patch management tools and our guide to Satellite and Spacewalk alternatives, SUSE Multi-Linux Manager is powerful for large SUSE estates that want local repository mirroring and Salt-driven configuration management, but it requires operating a dedicated control-plane server, database, and mirror storage.
How SysWard Manages SUSE and openSUSE Fleets
For teams running SLES or openSUSE Leap alongside RHEL, Rocky Linux, Ubuntu, or Debian, SysWard provides a single fleet dashboard without the weight of SUSE Manager:
- Unified inventory and CVE matching: The SysWard agent reports installed RPMs and checks
zypper list-patchessecurity categories on every SLES and openSUSE host, cross-referencing installed versions against live CVE feeds for Linux vulnerability management. - Orphaned-process and reboot tracking: The agent runs
zypper ps -sso the dashboard flags SUSE hosts where running services still reference replaced shared libraries after an update. - Package locks and grouped rollouts: Lock sensitive packages (
zypper addlock/removelock) and schedule upgrades (zypper up) across dev, staging, and production server groups inside maintenance windows. - Audit-ready compliance history: Every patch job records who triggered the run, when it executed, and the exact before/after package versions for SOC 2, PCI DSS, and ISO 27001 audits.
Start with up to 5 servers on the free tier — get started free, no credit card required, or deploy the self-hosted appliance inside your own network.