openSUSE Zypper

ID

zypper

Home page

https://en.opensuse.org/Portal:Zypper

Version requirement

>= 1.14

Platforms

🅱️ BSD · 🐧 Linux · ⨂ Unix

Operations

installed · outdated · orphans · search · install · upgrade · upgrade_all · remove · sync · cleanup

purl types

pkg:rpm · pkg:zypper

CLI name

zypper

Every call

zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh <command>

Issues and PRs

📦 manager: rpm-based

Source

meta_package_manager/managers/zypper.py

openSUSE’s package manager.

mpm drives zypper in XML mode (--xmlout) and parses the result with xmltodict: the most stable machine-readable output zypper offers. Every call is pinned with --no-color and --no-abbrev (untruncated columns), --non-interactive for unattended runs, and --no-cd --no-refresh so it never touches removable media or auto-refreshes metadata (mpm refreshes explicitly through sync).

Note

Both installed and search run search --details --type package: --details is the only mode exposing versions, but it returns one row per source package, architecture and past release. mpm drops other-version rows and keeps the highest edition per package name to collapse those duplicates.

Documentation:

What mpm adds to zypper

Through mpm, zypper gains a one-command cleanup --orphans that removes every orphaned dependency at once.

Bigger still, mpm reaches across every manager at once: mpm installed and mpm outdated cover zypper alongside dnf, dnf5, yum and any other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.

Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.

Your zypper commands, in mpm

You already know zypper: each operation maps one-to-one onto mpm, in an interface shared by every manager.

To…

With zypper

With mpm

List what’s installed

zypper --xmlout search --details --type package --installed-only

mpm --zypper installed

List outdated packages

zypper --xmlout list-updates

mpm --zypper outdated

Search for a package

zypper --xmlout search --details --type package kopete

mpm --zypper search <pkg>

Install a package

sudo zypper install kopete

mpm install pkg:zypper/kopete

Upgrade one package

sudo zypper update kopete

mpm --zypper upgrade kopete

Upgrade everything

sudo zypper update

mpm --zypper upgrade --all

Remove a package

sudo zypper remove kopete

mpm remove pkg:zypper/kopete

List orphaned dependencies

zypper packages --unneeded

mpm --zypper orphans

Clear caches

sudo zypper clean

mpm --zypper cleanup --cache

Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.

Operations

Operation

Supported

Notes

installed

outdated

orphans

search

install

upgrade

upgrade_all

remove

--orphans also drops the package’s orphaned dependencies

sync

cleanup

--orphans sweep backfilled by mpm

doctor

Selecting and configuring zypper

Deselect zypper for a single run with --no-zypper, or persist the choice in your configuration:

[mpm]
zypper = false

The arguments and environment variables listed in the box atop this page are forced on every zypper call, so runs stay quiet, non-interactive and reproducible: the defaults you would set in CI anyway.

Keep it enabled but tune how mpm drives it with a per-manager override:

[mpm.managers.zypper]
timeout = 900

mpm config-template zypper prints every overridable attribute as a ready-to-paste block.

Recipes

A few jobs you would otherwise script around zypper, one mpm command each:

  • Snapshot and clone a machine: mpm --zypper dump zypper.toml, then mpm restore zypper.toml on the next one.

  • Export a compliance SBOM: mpm --zypper sbom (CycloneDX by default, --spdx for SPDX).

Privilege escalation

System-wide manager: mpm wraps its privileged operations in sudo out of the box. Instead of letting the tool prompt mid-run, mpm primes the credential cache up-front, with a single branded password prompt at most. Turn escalation off for rootless setups with --no-sudo or the per-manager sudo override.

See privilege escalation for the full policy.

Cooldown

State of openSUSE Zypper’s release-age gating, from the cooldown support table:

Status: ❌ None

A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:

  • Registry: Distro binary archives (pkg:deb, pkg:rpm, pkg:alpm, pkg:apk)

  • Retraction: Index revert: removal is an archive operation and the mirror is rebuilt without the package. Debian, for one, requires filing an RM: bug against ftp.debian.org (developers-reference)

  • Publish date: ❌ the version string is the distro maintainer’s build, carrying no upstream publication date

With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --allow-unsupported-managers opts back in.

Version probe

The version is probed by running:

$ zypper --version
zypper 1.14.11

and extracted with:

r"zypper\s+(?P<version>\S+)"

Reference traces

Raw native outputs captured in the manager source: the reference mpm’s parsers were written against. If you know openSUSE Zypper well and a transcript below looks wrong, or a newer release changed its output format, report it.

$ zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh             --xmlout list-updates
<?xml version='1.0'?>
<stream>
    <message type="info">Loading repository data...</message>
    <message type="info">Reading installed packages...</message>
    <update-status version="0.6">
        <update-list>
            <update name="git" kind="package" edition="2.34.1-10.9.1"
                    edition-old="2.26.2-3.34.1" arch="x86_64">
                <summary>Fast, scalable revision control system</summary>
                <description>
                    Git is a fast, scalable, distributed revision
                    control system.
                </description>
                <license/>
                <source
                    url="http://download.opensuse.org/updata/leap/15.3/sle"
                    alias="repo-sle-update"/>
            </update>
            <update name="vim" kind="package" edition="9.0.1234-1.1"
                    edition-old="8.2.4956-1.1" arch="x86_64">
                <summary>Vi IMproved text editor</summary>
                <description>
                    Highly configurable text editor.
                </description>
                <license/>
                <source
                    url="http://download.opensuse.org/update/leap/15.3/sle"
                    alias="repo-sle-update"/>
            </update>
        </update-list>
    </update-status>
</stream>
$ zypper --no-color --no-abbrev --non-interactive --no-cd --no-refresh             packages --unneeded
Loading repository data...
Reading installed packages...
S  | Repository | Name    | Version   | Arch
---+------------+---------+-----------+-------
i  | @System    | libfoo  | 1.2.3-1.1 | x86_64
i+ | openSUSE   | libbar  | 0.9-2.4   | noarch

Feed any of these through mpm and the raw output becomes one uniform table, the same shape for every manager: filter it, project columns, or export it (mpm --zypper installed --output json, or csv, toml, yaml), each package carrying a purl and a version comparable across managers.

Changelog

  • 6.4.1 (2026-05-04)

    • Loosen the xmltodict floor from >=1 to >=0.12.

  • 6.4.0 (2026-04-27)

    • Add remove operation. Closes #1775.

  • 5.12.0 (2023-02-25)

    • outdated returns early when zypper prints nothing, instead of handing an empty document to the XML parser.

  • 5.2.0 (2022-06-16)

    • Fix outdated crashing when zypper reports no update at all: the XML traversal assumed the update-list element always held a mapping.

  • 5.0.0 (2022-04-25)

    • Add zypper support for Suse and OpenSuse. Closes #566.