📖 Preamble
In the openSUSE ecosystem — Leap or Tumbleweed — Zypper is the central tool for software management. This guide provides a clear and structured reference, organized by professional use and accessible to all levels.
Objective
Master Zypper progressively, from beginner to expert, with concrete practical cases and verified commands.
👥 Target audience
🌱
Beginner
Be operational quickly
Sections: Starter Pack
🌿
Intermediate
Understand repositories, priorities, updates
Sections: Concepts & Practices
🌳
Expert
Troubleshooting, migrations, sensitive commands
Sections: Advanced & Critical
📚 How to read this guide
| Level | Content | Recommendation |
|---|
| 🟢 Essential | Common commands, examples | Master first |
| 🟠 Intermediate | Concepts, workflows | To deepen |
| 🔴 Expert | Critical cases, advanced operations | For experienced users only |
❓ What is Zypper?
| Element | Description |
|---|
| Role | Package manager for openSUSE / SLE |
| Engine | Based on libzypp |
| Strengths | Dependency resolution, fine repository management, stability |
| Audience | Advanced users, admins, power users |
📝 Basic syntax
General structure
zypper [GLOBAL_OPTIONS] SUBCOMMAND [SUBCOMMAND_OPTIONS] [ARGUMENTS]
Pedagogical breakdown
| Element | Role | Example |
|---|
| GLOBAL_OPTIONS | Options applied to the whole command | -n, -v, --non-interactive |
| SUBCOMMAND | The main action to execute | in, rm, up, dup, se |
| SUBCOMMAND_OPTIONS | Options specific to that action | --no-recommends, --force-resolution |
| ARGUMENTS | What the action applies to | Package name, version, pattern |
Complete example
| Action | Command | Explanation |
|---|
| Install a package without recommendations | zypper -v in --no-recommends <package> | -v = global, in = subcommand, --no-recommends = option, <package> = argument |
Additional examples
| Objective | Command | Reading |
|---|
| Full upgrade | zypper dup --force-resolution | dup = subcommand, --force-resolution = option |
| Install a specific version | zypper in <package>=<version> | argument = name + version |
| Search for a package | zypper se <package> | simple subcommand + argument |
$zypper -v in --no-recommends htop
🏗️ Internal architecture: Zypper + libzypp
Zypper does not act alone: it relies on libzypp, a very powerful engine that handles dependency resolution, conflicts and transactions.
┌────────────┐ ┌──────────────────────┐ ┌──────────────────────┐
│ Zypper │ ───▶ │ libzypp │ ───▶ │ RPM / Linux System │
└────────────┘ └──────────────────────┘ └──────────────────────┘
│ │ │
▼ ▼ ▼
CLI interface Dependency resolution Installation / removal
Commands Conflicts / vendor change Atomic transactions
Repository priorities Snapshots (Btrfs)
Component roles
| Component | Role | Importance |
|---|
| Zypper | CLI interface | User interaction |
| libzypp | Resolution engine | Intelligent decisions |
| RPM | Actual installation | File management |
| Snapper | Btrfs snapshots | System rollback |
📦 Repositories
Role of repositories: the foundation of everything
Repositories are the sources of packages. Their configuration directly influences system stability.
┌───────────────┐
│ OSS repo │ prio 99
└───────────────┘
│
┌───────────────┐
│ Update repo │ prio 90
└───────────────┘
│
┌───────────────┐
│ Packman │ prio 70
└───────────────┘
│
┌───────────────┐
│ Misc repos │ prio 120
└───────────────┘
Repository types
| Type | Content | Notes |
|---|
| OSS / Main | Official packages | System base |
| Non-OSS | Proprietary packages | Drivers, codecs |
| Update | Fixes | Always enabled |
| Packman | Multimedia | High priority |
| Community | KDE, GNOME, Graphics | Use with caution |
Repository structure
Repository
├── Name : repo-oss
├── URL : https://download.opensuse.org/...
├── Priority : 99
├── Auto-refresh : Yes
└── Enabled : Yes
🔄 Repository lifecycle
Add (ar)
│
▼
Modify (mr) ───► Enable / Disable
│
▼
Remove (rr)
Official vs community repositories
| Repository type | Advantages | Risks |
|---|
| Official | Stable, tested, supported | None major |
| Packman | Complete multimedia | May replace libs |
| Community | Recent versions, specialized | Possible conflicts |
| Experimental | Very recent software | Instability |
⚠️ Sensitive repositories
| Repository | Potential problem | Recommendation |
|---|
| home:<user> | Untested packages | Avoid on critical systems |
| KDE/GNOME repos | Very recent versions | Priority > 100 recommended |
| "Factory" repos | Unstable | Experts only |
| Duplicate repos | Package conflicts | Never duplicate OSS/Update |
Sensitive repositories
home:<user> — Untested packages, avoid on critical systems
KDE/GNOME repos — Very recent versions, priority > 100 recommended
"Factory" repos — Unstable, experts only
🏆 Best practices Leap / Tumbleweed
| Distribution | Recommended repos | Discouraged repos |
|---|
| Leap | OSS, Non-OSS, Update, Packman | Unstable repos, Factory |
| Tumbleweed | OSS, Non-OSS, Update, Packman | Too recent community repos |
| Servers | Official repos only | Packman, home:<user> |
⚖️ Repository priorities
The priority concept allows Zypper to choose which package to favor.
Zypper needs to install a package:
│
▼
1. Repository with best priority
│
▼
2. Most recent version
│
▼
3. Most consistent vendor
│
▼
4. Dependency resolution
│
▼
5. Installation
Important rule
Low priority = Important repository
Example: Priority 20 = very high priority, Priority 120 = low priority
Priority levels table
| Priority | Interpretation | Usage |
|---|
| 20–70 | Very high | Packman, critical repos |
| 99 | Standard | Official repos |
| >100 | Low | Experimental repos |
Recommended priorities
| Repository | Recommended priority | Reason |
|---|
| Packman | 70 | Priority for codecs |
| Update | 90 | Important fixes |
| OSS / Non-OSS | 99 | System base |
| Community | >100 | Avoid conflicts |
| Experimental | 120-150 | High risks |
🧩 Patterns / Patches / Products
| Type | Description | Useful commands |
|---|
| Pattern | Logical group of packages | zypper se -t pattern |
| Patch | Security/stability fix | zypper lp, zypper patch |
| Product | Major system component | zypper se -t product |
Product
├── Patterns
│ ├── Packages
│ └── Packages
└── Patches
├── Fixes
└── Updates
🔄 Leap vs Tumbleweed — In 20 seconds
Type: Stable, based on SLE
Risks: Low
Usage: Production, servers
Command:zypper up
Type: Rolling release
Risks: Sensitive repos
Usage: Advanced desktop, dev
Command:zypper dup
🚀 Starter Pack — The 15 essential commands
Master these 15 commands to be quickly operational on openSUSE.
1
zypper ref
Refresh repositories
2
zypper up
Standard update (Leap)
3
zypper dup
Complete upgrade (Tumbleweed)
4
zypper in <pkg>
Install a package
5
zypper rm <pkg>
Remove a package
6
zypper in -f <pkg>
Reinstall a package
7
zypper se <pattern>
Search for a package
8
zypper info <pkg>
Detailed information
9
zypper wp <capability>
Which package provides a file?
10
zypper lr -u
List repositories + URL
11
zypper ar <url> <name>
Add a repository
12
zypper rr <name>
Remove a repository
13
zypper mr -p <prio> <name>
Modify priority
15
zypper ps
Blocking processes
📦 Repository management (commands)
Inspect repositories
$zypper lr
$zypper lr -u
$zypper lr -p
$zypper lr -d
Add, remove, modify
$zypper ar https://url graphics
$zypper rr graphics
$zypper mr -p 70 repo-oss
$zypper mr -d repo-debug
$zypper mr -e repo-debug
📥 Installation / Update / Removal
zypper up vs zypper dup
| Criteria | zypper up | zypper dup |
|---|
| Changes vendor | ❌ No | ✔️ Yes |
| Downgrades a package | ❌ No | ✔️ Yes |
| Strictly follows repositories | ❌ No | ✔️ Yes |
| Recommended usage | Leap | Tumbleweed |
| Risk | Low | Medium |
openSUSE Leap
│
├──▶ zypper up (normal)
└──▶ zypper dup (migration / repair)
openSUSE Tumbleweed
│
└──▶ zypper dup (always)
Installation and removal
$zypper in htop
$zypper in git curl vim
$zypper in vim=9.0
$zypper in -f bash
$zypper rm htop
$zypper rm -u docker
zypper in
│
▼
Search in repositories
│
▼
Select best package
│
▼
Install + dependencies
Package removal
| Action | Command | Example | Notes |
|---|
| Remove a package | zypper rm <pkg> | zypper rm htop | Standard removal |
| Remove multiple packages | zypper rm <pkg1> <pkg2> | zypper rm nano vim | Practical |
| Simulate before removal | zypper rm -D <pkg> | zypper rm -D firefox | Simulation mode |
| Remove a pattern | zypper rm -t pattern <name> | zypper rm -t pattern kde | Removes a set |
zypper rm
│
▼
Dependency analysis
│
▼
Safe removal
Version and lock management
$zypper al kernel-default
$zypper ll
$zypper rl kernel-default
🔐 Manage versions and vendors
| Action | Command | Example | Notes |
|---|
| Install a version | zypper in pkg=ver | zypper in ffmpeg=5.1 | Downgrade possible |
| Lock a package | zypper al <pkg> | zypper al kernel-default | Prevents updates |
| Unlock | zypper rl <pkg> | zypper rl kernel-default | Removes lock |
| See vendor | zypper info <pkg> | zypper info vlc | Shows Packman or OSS |
🧹 Automatic cleanup
| Action | Command | Example | Notes |
|---|
| Clean cache | zypper clean | zypper clean | Deletes downloaded files |
| Clean everything | zypper clean -a | zypper clean -a | Cache + metadata |
| Remove orphans | zypper rm -u | zypper rm -u | Unneeded dependencies |
| See orphans | zypper packages --orphaned | zypper packages --orphaned | Packages without repo |
| Full cleanup | zypper purge-kernels | zypper purge-kernels | Remove old kernels |
zypper clean
│
▼
Delete cache
│
▼
Lighter system
🛠️ Maintenance & Diagnosis
🔍 Detect broken packages
$zypper ve
$zypper packages --orphaned
$zypper verify
$zypper ps
zypper ve
│
├── Missing dependencies ?
├── Broken packages ?
└── Proposed solutions
⚔️ Resolve conflicts
| Conflict | Common cause | Recommended solution |
|---|
| Version conflict | Inconsistent repos | Adjust priorities |
| Vendor conflict | Packman vs OSS | Force vendor / review repos |
| Missing dependency | Package removed | Install dependency |
| Locked package | zypper al active | Unlock |
Conflict detected
│
▼
Zypper proposes:
1. Keep old version
2. Change vendor
3. Remove a package
│
▼
User choice
⏸️ Identify blocking processes
| Action | Command | Description |
|---|
| See blocking processes | zypper ps | Services using old libraries |
| Advanced analysis | lsof | Open files (outside Zypper) |
zypper ps
│
├── Services to restart
├── Processes using old libs
└── Restart advice
🔬 Check dependencies and consistency
| Action | Command | Description |
|---|
| Check dependencies | zypper ve | Detects inconsistencies |
| Check vendor | zypper info <pkg> | Shows vendor |
| List vendors | zypper se -s <pkg> | Compare sources |
| See duplicates | zypper se --duplicates | Detects duplicate packages |
Consistency analysis
│
├── Versions consistent ?
├── Vendors homogeneous ?
├── Duplicate packages ?
└── Dependencies satisfied ?
🗑️ Advanced cleanup
Advanced cleanup
$zypper clean
$zypper clean -a
$zypper rm -u
$zypper purge-kernels
⚡ Advanced commands (Expert)
Change vendor (dup --from)
$sudo zypper dup --from packman
$zypper se -s vlc
Advanced search
$zypper se -s ffmpeg
$zypper se -si 'vlc*'
$zypper se -i python
$zypper search --provides --match-exact libxyz.so
Patterns / metadata
│
├── Required packages (installed)
└── Recommended packages (missing)
│
▼
zypper install-new-recommends
Install sources
$zypper si kernel-default
$zypper si -d ffmpeg
🔍 Advanced verification (verify)
| Action | Command | Description |
|---|
| Verify full consistency | zypper verify | Full system analysis |
| Quick dependency check | zypper ve | Quick analysis |
zypper verify
│
├── Broken dependencies ?
├── Inconsistent vendors ?
├── Incompatible versions ?
└── Proposed solutions
🩹 Check patches (patch-check)
| Action | Command | Description |
|---|
| See available patches | zypper lp | List patches |
| Check without installing | zypper patch-check | Analysis only |
| Install patches | zypper patch | Apply fixes |
zypper patch-check
│
├── Security patches ?
├── Recommended patches ?
└── Optional patches ?
⚖️ Fine priority management
| Action | Command | Example |
|---|
| Modify priority | zypper mr -p <prio> <repo> | zypper mr -p 70 packman |
| See priorities | zypper lr -p | zypper lr -p |
| Disable repository | zypper mr -d <repo> | zypper mr -d repo-debug |
Low priority = important repository
High priority = secondary repository
Example:
Packman → 70
OSS → 99
Experimental → 120
⚠️ Dangerous commands — Red zone
Warning
Some Zypper commands are extremely powerful and can break a system if misused. This section lists commands to handle with extreme caution.
💡 Why these commands are dangerous
Dangerous commands
│
├── Change vendor
├── Downgrade packages
├── Force inconsistent resolutions
├── Remove critical dependencies
└── Can break the system
List of dangerous commands
| Command | Danger | Risk |
|---|
| zypper dup (on Leap) | Downgrades, changes vendor | 🔥🔥🔥 |
| zypper dup --from <repo> | Massive vendor switch | 🔥🔥🔥 |
| zypper dup --solver-focus=update --force-resolution | Inconsistent resolutions | 🔥🔥🔥🔥 |
| zypper rm <pkg> | Removal of critical libs | 🔥🔥 |
| zypper rm -u | Removes orphaned dependencies | 🔥 |
The most dangerous command
$sudo zypper dup --solver-focus=update --force-resolution --details
Why it's dangerous
- Ignores libzypp protections
- Can break critical dependencies
- Can downgrade essential packages (kernel, systemd, glibc)
- Mixes vendors (OSS ↔ Packman ↔ home:user)
- Very hard to repair (often requires rollback)
🗑️ Removing critical packages
| Command | Danger | Example |
|---|
| zypper rm <pkg> | May remove vital dependencies | zypper rm systemd |
| zypper rm -u | Removes orphaned dependencies | Check before execution |
| zypper rm -t pattern <pattern> | Removes entire sets | zypper rm -t pattern kde |
Best practices before a dangerous command
| Check | Command | Why |
|---|
| Check vendors | zypper se -si <pkg> | Avoid conflicts |
| Check versions | zypper se -s <pkg> | Compare OSS / Packman |
| Check dependencies | zypper ve | Detect inconsistencies |
| Check repositories | zypper lr -u | Broken repos? |
| Take a snapshot | snapper create | Rollback possible |
🏆 Top 11 advanced Zypper commands
1
sudo zypper dup --from <repo>
Clean vendor switch (Packman ↔ OSS)
🔥2
sudo zypper dup --solver-focus=update --force-resolution
Recover broken system
🔥🔥🔥3
zypper in --no-recommends <pkg>
Minimal installation
🟢4
zypper in --oldpackage <pkg>=<ver>
Clean downgrade
🟠5
zypper search --provides --match-exact <cap>
Find providing package
🟢6
zypper ve
Verify dependencies / consistency
🟠7
zypper --dry-run rm <pkg>
Simulation before removal
🟢8
zypper al <pkg>
Lock a critical package
🟠9
zypper search --requires <pkg>
See which packages depend on another
🟢10
zypper si -d <srcpkg>
Install build dependencies
🟢11
zypper info --provides --requires --recommends <pkg>
Full package audit
🟢🎯 Advanced practical cases (GPS format)
Problem
Multimedia broken / vendors mixed
Cause
OSS packages instead of Packman
Command
zypper dup --from packman
$sudo zypper dup --from packman
Problem
Inconsistent snapshot
Command
dup --force-resolution
$sudo zypper dup --solver-focus=update --force-resolution
Problem
Too many dependencies
Cause
Automatic recommendations
Result
Lightweight installation
$zypper in --no-recommends nginx
Problem
Recent version unstable
Result
Stable version restored
$zypper in --oldpackage ffmpeg=5.1
Problem
"libXYZ.so not found"
$zypper search --provides --match-exact libXYZ.so
Problem
Broken dependencies
Cause
Inconsistent packages / conflicts
Result
System state verified
Problem
Risk of critical removal
Cause
Unknown dependencies
Result
Preview without risk
$zypper --dry-run rm firefox
Cause
New unstable version
$zypper al kernel-default
Result
Dependents identified
$zypper search --requires openssl
Problem
Compilation impossible
Cause
Missing development packages
Result
Build environment ready
📊 Comparison Zypper vs apt vs dnf vs pacman
Dependency resolution
| Action | Zypper | apt | dnf | pacman |
|---|
| Check dependencies | zypper ve | apt-get check | dnf repoquery --requires | pactree |
| Resolve conflicts | zypper dup --force-resolution | — | dnf distro-sync | — |
| See dependencies | zypper info --requires | apt-cache depends | dnf repoquery --requires | pactree |
Repository management
| Action | Zypper | apt | dnf | pacman |
|---|
| Add a repository | zypper ar | add-apt-repository | dnf config-manager --add-repo | Edit pacman.conf |
| Modify priority | zypper mr -p | — | — | — |
| Force vendor | zypper dup --from | — | dnf swap | — |
Rolling release
| Action | Zypper (TW) | apt (sid) | dnf (Rawhide) | pacman |
|---|
| Full upgrade | zypper dup | apt full-upgrade | dnf upgrade --refresh | pacman -Syu |
| Recovery | zypper dup --force-resolution | apt --fix-broken | dnf distro-sync | — |
| Snapshots | snapper list | — | — | — |
Command consistency and power
| Action | Zypper | apt | dnf | pacman |
|---|
| Install a package | zypper in <pkg> | apt install <pkg> | dnf install <pkg> | pacman -S <pkg> |
| Remove a package | zypper rm <pkg> | apt remove <pkg> | dnf remove <pkg> | pacman -R <pkg> |
| Install a specific version | zypper in <pkg>=<ver> | apt install <pkg>=<ver> | dnf install <pkg>-<ver> | pacman -U <pkg>-<ver>.pkg.tar.zst |
| Install sources | zypper si <srcpkg> | apt source <pkg> | dnf download --source <pkg> | — (no direct equivalent) |
| Search for a package | zypper se <pkg> | apt search <pkg> | dnf search <pkg> | pacman -Ss <pkg> |
| Find who provides a capability | zypper search --provides --match-exact <cap> | apt-file search <cap> | dnf provides <cap> | pacman -F <cap> |
🔗 Complete references
Official openSUSE documentation
Man pages (local sources)
| Command | Content |
|---|
| man zypper | Commands, global options |
| man zypper-install | Installation, dependencies |
| man zypper-dup | Dist-upgrade, vendor switch |
| man zypper-repos | Repository management |
| man zypper-search | Advanced search |
| man rpm | Scripts, installed files |
$zypper help
$zypper help install
$zypper help dup
$zypper help remove
$zypper help search
$zypper help up
$zypper help lr
📖 Recommended readings SafeITExperts
To deepen your knowledge of Linux and openSUSE, here is a selection of complementary articles published on SafeITExperts.
🎯 Conclusion
Zypper is a demanding tool, but it rewards those who take the time to understand it. With a solid mastery of repositories, priorities and the solver, openSUSE administration becomes more predictable, more consistent and safer.
Key points to remember
- Leap → zypper up | Tumbleweed → zypper dup
- Always check with zypper ve before a critical operation
- Use --dry-run to simulate
- Manage priorities to avoid vendor conflicts
- Take snapshots with Snapper before dangerous commands
This guide does not claim to say everything: it paves the way. The rest belongs to your practice, your curiosity and your ability to make Zypper a daily ally.