Skip to content
← All solutions

Solutions

SUSE & openSUSE Patch Management Made Simple

SUSE Linux patching runs through zypper: zypper refresh updates repositories, zypper patch applies released patches, and zypper patch --category security limits it to security fixes. SUSE Manager suits large licensed estates. For mixed fleets, SysWard inventories SUSE and openSUSE hosts alongside other distros, matches packages against live CVE data, and schedules grouped rollouts.

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

ApproachSecurity-only updatesStaged rolloutsMixed-distro fleetsExtra license
Manual zypperzypper patch —category securityBy handNoNo
zypper with a systemd timerYesPer host onlyNoNo
SUSE ManagerYesChannels and stagesSUSE-centricYes
SysWardYes, with CVE contextGroupsYes, every distro in one fleetNo, 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 --bz filters. By default it does not upgrade packages from third-party repositories that lack patch definitions; pass --with-update if 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 through zypper 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 use zypper dup for 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 codeConstantMeaning in automation
0ZYPPER_EXIT_OKCompleted cleanly, no further action needed
100ZYPPER_EXIT_INF_UPDATE_NEEDEDpatch-check found applicable patches waiting
101ZYPPER_EXIT_INF_SEC_UPDATE_NEEDEDpatch-check found security patches waiting
102ZYPPER_EXIT_INF_REBOOT_NEEDEDUpdates succeeded; host requires a reboot
103ZYPPER_EXIT_INF_RESTART_NEEDEDPackage 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-patches security 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 -s so 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.

Frequently Asked Questions

How do I patch a SUSE Linux Enterprise Server with zypper?

Refresh repository metadata with sudo zypper refresh, inspect pending advisories with sudo zypper list-patches, and apply them with sudo zypper patch -y. To install only security advisories, run sudo zypper patch --category security -y. Afterward, run sudo zypper needs-rebooting (exit code 102 means a reboot is required) and sudo zypper ps -s to see services still using deleted shared libraries.

What is the difference between zypper patch and zypper update?

zypper patch applies official SUSE maintenance patches — curated update bundles published by SUSE with a category (security, recommended, optional), severity rating, and mapped CVE list. zypper update (zypper up) upgrades every installed package that has a newer version in any enabled repository, including third-party repos that do not publish patch metadata. On SLES, zypper patch --with-update runs both in one pass.

How do I patch a single CVE on SLES or openSUSE Leap?

Run sudo zypper list-patches --cve=CVE-YYYY-NNNNN to identify the SUSE maintenance advisory that resolves the vulnerability, then run sudo zypper patch --cve=CVE-YYYY-NNNNN -y to install only the packages required by that patch. You can also target an advisory directly by patch ID using sudo zypper patch --bugzilla or the patch name shown by zypper list-patches.

How do I roll back a bad zypper patch on SLES?

When SLES is installed on its default Btrfs root filesystem with Snapper enabled, zypp-plugin-snapper automatically creates a pre and post filesystem snapshot around every zypper transaction. Run sudo snapper list to locate the snapshot pair, sudo snapper status <pre>..<post> to inspect modified files, and sudo snapper rollback <pre> followed by a reboot to restore the exact pre-patch root filesystem state.

Why did zypper patch --non-interactive exit with code 102 or 103?

zypper uses exit codes 100 and above for operational states rather than failures. Exit code 102 (ZYPPER_EXIT_INF_REBOOT_NEEDED) means the transaction succeeded and a kernel or core library update requires a reboot. Exit code 103 (ZYPPER_EXIT_INF_RESTART_NEEDED) means zypper updated the package manager stack itself (libzypp or zypper) and must be run a second time to apply the remaining patches.

How does SysWard handle SUSE and openSUSE alongside RHEL and Ubuntu?

SysWard installs the same lightweight agent on SLES and openSUSE Leap as on RHEL, Rocky, Ubuntu, and Debian. It inventories installed RPM packages, correlates them against live CVE feeds, flags hosts where zypper ps detects processes running replaced libraries, locks held packages with zypper addlock, and schedules package upgrades across server groups with a complete audit trail. Free for 5 servers.

More Solutions

Stop patching Linux servers by hand

SysWard automates patch management across your entire fleet — CVE scanning, scheduled rollouts, and audit-ready reports in one dashboard.

Start free