Updating openSUSE: zypper patch, up and dup explained
Use the right zypper command for Leap or Tumbleweed, finish the update properly, and keep extra repos in check.
Part 4 of 10 in openSUSE home server setup. Last updated
In short: On Leap, run sudo zypper patch for official fixes only, or sudo zypper up to update every package inside the release. On Tumbleweed, always run sudo zypper dup: a new snapshot can rename, split or drop packages, and only dup handles that. After updating, sudo zypper ps -s shows services still running old libraries and zypper needs-rebooting tells you whether to reboot. Keep extra repositories few, and read what zypper proposes before you type y.
Leap: patch or up
Every command that changes packages needs root:
sudo zypper refresh # fetch the latest repository metadata
zypper list-patches # what is waiting (zypper lp)
zypper lp --category security # only security fixes
sudo zypper patch # install the official patches
sudo zypper up # or: update every package in the release patch installs only the fixes openSUSE released as patches, each with an ID and a
description. up also picks up newer versions from any extra repository you added.
With only the official repositories they end up nearly the same; with extra repositories,
patch is the conservative one.
Tumbleweed: always dup
sudo zypper refresh
sudo zypper dup # distribution upgrade to the newest snapshot
A Tumbleweed snapshot is a whole new distribution release. Packages get renamed, split or
dropped between snapshots. zypper up only updates what it can without removing
anything, so it leaves you somewhere between two snapshots: the classic "Tumbleweed broke"
story. dup makes the system match the snapshot exactly.
Read the summary before typing y: how many packages are updated, which are
removed, and whether anything changes vendor. A removal you do not expect is the moment to
answer n and check the openSUSE factory mailing list or forums.
Unsure what a flag does? Paste the command into the
shell command explainer.
How much one dup can bring: the list below is what one Tumbleweed laptop would
get on that day. You do not need root to look:
$ zypper --no-refresh list-updates | head -6
Loading repository data...
Reading installed packages...
S | Repository | Name | Current Version | Available Version | Arch
---+---------------------------+-----------------------------------+---------------------------------------+---------------------------------------+-------
v | Main Repository (OSS) | 7zip | 26.02-2.1 | 26.03-1.1 | x86_64
v | Main Repository (OSS) | aaa_base | 84.87+git20260610.3b5a868c-1.3 | 84.87+git20260916.e122202-1.1 | x86_64
$ zypper --no-refresh list-updates | grep -c '^v '
1062 Real output on openSUSE Tumbleweed, zypper 1.14.98, 2026-09-28; user and host names and addresses redacted.
After the update: restart or reboot?
sudo zypper ps -s # services still using deleted (old) files
zypper needs-rebooting # says whether a reboot is needed
sudo systemctl restart sshd # restart what zypper ps listed
sudo reboot # after a kernel, glibc or systemd update
A new kernel only runs after a reboot. On Tumbleweed that happens with most snapshots, so
plan a reboot after every dup. If the new snapshot misbehaves, the
snapper rollback guide takes you back.
A run on a laptop where no core library or service changed since the last boot:
$ zypper ps -s
No processes using deleted files found.
No core libraries or services have been updated since the last system boot.
Reboot is probably not necessary.
Note: Not running as root you are limited to searching for files you have permission to examine with the system stat(2) function. The result might be incomplete. Real output on openSUSE Tumbleweed, 2026-09-28; user and host names and addresses redacted.
Mind the last line: without sudo, zypper ps only sees your own processes.
Extra repositories and locks
zypper lr -d # repositories with URL and priority
sudo zypper addlock podman # keep podman at its current version
zypper locks # list locks
sudo zypper removelock podman # release it again
Every extra repository is a second vendor for your system. Keep them few, prefer the devel
projects on OBS over personal home: projects, and remove the ones you no longer
need. A lock is the emergency brake when a new version of one package misbehaves; remove it
once the fix is out, or you silently stop getting fixes.
Upgrading Leap to the next version
Minor Leap versions (16.0 to 16.1) upgrade in place. Read the release notes first, update fully, then switch the release version for the repositories (needs root):
sudo zypper up # finish the current release first
sudo zypper --releasever=16.1 refresh
sudo zypper --releasever=16.1 dup
sudo reboot
This works when your repository URLs contain $releasever (check with
zypper lr -u); the default repositories do. The big jump from Leap 15.6 to 16 has
its own migration tool and notes; follow the official release notes for that one, and take a
backup first. Snapper covers the system, not your data.
Common mistakes
zypper up on Tumbleweed
It looks like it worked, until a renamed library leaves something half-updated. Use
dup, every time.
Answering y without reading
zypper lists every removal and vendor change. Three seconds of reading beats an evening of rollback. Snapper makes mistakes cheap, not free.
Months between updates
A Tumbleweed that has not been updated for half a year may need a pile of changes in one step, and older repository keys may have been rotated. Update often, in small steps. The automatic updates guide can do it for you.
Frequently asked questions
What is the difference between zypper up and zypper dup?
zypper up updates installed packages to newer versions but never removes packages or switches them to another repository. zypper dup makes the system match the repositories exactly: it may downgrade, remove or replace packages. Tumbleweed needs dup; on Leap, up (or patch) is right until you upgrade to a new Leap version.
How often should I update Tumbleweed?
Every week or two is a good rhythm for a server. Small steps are easier to read and to roll back than a quarter's worth of changes in one go.
zypper says it updated itself and I should run it again. Is that normal?
Yes. When the package manager stack itself is updated, zypper installs that first and asks you to run the same command again, so the rest of the update runs with the new version.