Zypper is a command-line package manager (similar to APT for DEB-based systems or DNF for RPM-based ones) used in openSUSE, SUSE Linux Enterprise, and their derivatives. It provides users with a fast and flexible way to install, update, remove, and manage software packages and repositories, giving you full control over your system’s software environment.
Under the hood, Zypper works with RPM packages—the same package format used across many RPM-based Linux distributions. It relies on libzypp, a backend library that resolves dependencies, manages repositories, and handles transactions securely and efficiently.
In this guide, I’ll show you, through practical Zypper commands and real-world examples, how to install new applications, keep your system up to date, search for packages, manage repositories, and more. By the end, I hope you’ll feel confident enough to manage your openSUSE system efficiently from the terminal.
You can also use the examples below as a quick reference if you’re already familiar with Zypper and just want to refresh your memory on a specific command or option.
- Zypper Command Cheat Sheet: Short and Long Versions
- Refresh Package Base
- Check Available Package Updates
- Apply Package Updates
- Full System Upgrade
- Search Packages
- Install Packages
- Remove Packages
- Show Package Information
- Verify Installed Packages
- Clean Cached Data
- Manage Software Repositories
- Patterns
- Conclusion
Zypper Command Cheat Sheet: Short and Long Versions
Zypper offers two ways to execute nearly all of its operations — a short form for speed and convenience, and a long form for readability and clarity. The short forms are widely used in practice because they’re convenient for quick commands, while the long forms are clearer and are often used in scripts or documentation.
Which one you choose is entirely up to you — the result is the same. For simplicity, and because it’s the common way to do it, I’ll use the short form in the examples below. But before we get into the hands-on part, here’s a table showing both the short and long forms of the most commonly used Zypper commands.
| Short | Long | Description |
|---|---|---|
| in | install | Install packages |
| rm | remove | Remove (uninstall) packages |
| up | update | Update installed packages |
| dup | dist-upgrade | Perform a distribution upgrade (smart resolver) |
| lu | list-updates | List available updates |
| ve | verify | Verify and fix package dependencies |
| se | search | Search for packages |
| if | info | Show detailed package information |
| pa | packages | List all available or installed packages |
| lr | repos | List all repositories |
| ar | addrepo | Add a repository |
| rr | removerepo | Remove a repository |
| ref | refresh | Refresh repository metadata |
| clean | clean | Clean cache and metadata |
Refresh Package Base
We’ll start with one of the Zypper commands you’ll use most often: zypper ref (or zypper refresh), which refreshes the package base. When you run it, Zypper contacts each repository server and downloads the latest metadata—package lists, versions, dependencies, and update information.
sudo zypper refCode language: Bash (bash)

Keep in mind that refreshing does not install anything. It simply ensures your system has the most current package information before checking for or applying updates.
In most workflows, this is the first step before running commands like zypper lu, zypper up, or zypper dup, because those operations rely on up-to-date metadata.
Check Available Package Updates
zypper lu (or zypper list-updates) automatically refreshes repository metadata whenever it’s outdated and lists all packages on your system with newer versions. It does not install anything—its purpose is purely informational.
sudo zypper luCode language: Bash (bash)

Each line marked with v indicates a package with a newer version available, shown alongside its repository, current version, available version, and architecture.
As you have probably already guessed, you don’t need to run zypper ref before zypper lu, because the zypper lu actually refreshes repository metadata whenever it’s outdated.
Apply Package Updates
zypper up (or zypper update) is another one of the most commonly used Zypper commands, which installs all available regular package updates on your system. It relies on current repository metadata, so if needed, Zypper refreshes repositories automatically before proceeding.
sudo zypper upCode language: Bash (bash)

Full System Upgrade
zypper dup (or zypper dist-upgrade) can be used as a replacement for zypper up because it also installs all available updates. Still, it goes further when needed: it can switch package vendors, install renamed packages, and remove old or obsolete packages to keep the system consistent with the enabled repositories.
sudo zypper dupCode language: Bash (bash)

Most updates look the same under both commands, but when a package requires dropping older components or moving to a different repository, only zypper dup can perform those changes. This is why it’s used for distribution upgrades and why it can occasionally remove packages that are no longer provided by any repository.
Search Packages
Use zypper se (or zypper search) to find packages by name or description. This command searches all enabled repositories and displays matching results, including installed and available packages. For example:
zypper se firefoxCode language: Bash (bash)

The S column shows the package status (for example, i for installed), followed by the Name column with the exact package name, the Summary column with a short description, and the Type column indicating whether it’s a regular package, a pattern, or another package type.
If you want to search only through installed packages, add the -i option:
zypper se -i firefoxCode language: Bash (bash)

This filters the results so that only installed packages matching the name appear. If nothing is returned, the package is not installed.
Install Packages
Use zypper in (or zypper install) to add new packages to your system from the enabled repositories. The command resolves dependencies automatically and installs everything required for the selected package to run. For example:
sudo zypper in chromiumCode language: Bash (bash)

To install multiple packages simultaneously, list the package names one after the other, separated by spaces.
sudo zypper in chromium htop vlcCode language: Bash (bash)
Remove Packages
Use zypper rm (or zypper remove) to uninstall packages from your system. The command also removes dependencies that are no longer needed, unless other installed packages require them. For example:
sudo zypper rm chromiumCode language: Bash (bash)

Similarly to the install command, to uninstall multiple packages from your openSUSE system, type their names one after the other, separated by a space.
sudo zypper rm chromium htop vlcCode language: Bash (bash)
Show Package Information
Use zypper if (or zypper info) to view detailed information about a package. This includes its version, vendor, repository, installation status, summary, description, and dependencies. For example:
zypper info chromiumCode language: Bash (bash)

This is the quickest way to check in openSUSE which package’s version is installed, and which repository provides it.
Verify Installed Packages
Use zypper ve (or zypper verify) to check whether all installed packages have their required dependencies satisfied. If something is missing or broken—often after manual file removal, interrupted updates, or mixing repositories—this command identifies the problems and proposes fixes.
sudo zypper veCode language: Bash (bash)

Zypper will scan the system, report any dependency issues, and if needed, it’ll suggest installing or removing packages to restore consistency.
Clean Cached Data
Use zypper clean to remove cached repository data, such as downloaded package files and metadata. This helps free disk space and forces zypper to fetch fresh metadata the next time it accesses a repository.
sudo zypper cleanCode language: Bash (bash)
Manage Software Repositories
Zypper provides full control over the software repositories your openSUSE system uses to install and update packages. With a few simple commands, you can list, add, remove, enable, disable, or adjust repository settings directly from the command line, giving you precise control over how your system retrieves software.
List Repositories
Use zypper lr (or zypper repos) to list all configured repositories on your system. The output shows each repository’s alias, name, enabled/disabled state, autorefresh setting, priority, and URL.
zypper lrCode language: Bash (bash)

Add a Repository
If you want to add a repository to your openSUSE system, use zypper ar (or zypper addrepo) to add a new software repository to your system. You can specify the repository’s URL and give it an alias that will later appear in zypper repos. For example:
sudo zypper addrepo -f https://download.opensuse.org/repositories/network/openSUSE_Leap_16.0/ networkCode language: Bash (bash)

After adding a repository, zypper will include it when installing or updating packages. You can also enable auto-refresh or assign a priority using additional options when needed.
In the example above, the -f option enables autorefresh. However, if the repository is already added, you can turn auto-refresh on with:
sudo zypper modifyrepo -f netwrokCode language: Bash (bash)
Here, ‘network’ is the repository’s alias.
Remove a Repository
Use zypper rr (or zypper ) to delete a repository from your system. You can remove it by specifying its alias or its numeric ID, as shown in removerepozypper lr.
sudo zypper rr networkCode language: Bash (bash)

Enable/Disable a Repository
Zypper not only lets you add or remove repositories, but also enables or disables the ones you already have. Use zypper mr -d (or zypper modifyrepo -d) to disable a repository. You can reference it by its alias or by the numeric ID shown in zypper lr.
sudo zypper modifyrepo -d networkCode language: Bash (bash)

Similarly, to enable it, use zypper md -e (or zypper modifyrepo -e):
sudo zypper modifyrepo -e networkCode language: Bash (bash)

Patterns
Finally, I’ll show you how to use a handy concept that other distributions often call meta-packages, while openSUSE refers to them as patterns. So, what exactly are they?
In short, patterns are predefined groups of packages that openSUSE uses to install complete functional environments or roles. Instead of installing packages one by one, a pattern bundles everything needed for a specific task—such as a desktop environment, development tools, or server services.
The main benefit? Installing a pattern ensures you get all required components, recommended extras, and supporting libraries in one step, making it easy to add major system features without manually tracking individual packages.
List Patterns
Use zypper pt (or zypper patterns) to list all available patterns on the system. The command’s output shows each pattern’s name, whether it’s installed, and a short description of what it provides.
zypper ptCode language: Bash (bash)

Install Pattern
Let’s say you want to install the Cinnamon desktop environment with a single command. The pattern name is, as you can expect, cinnamon. Use zypper in -t pattern, followed by the pattern’s name, to install all packages that belong to that group.
sudo zypper in -t pattern cinnamonCode language: Bash (bash)

As you can see, this installs the entire Cinnamon desktop environment (pattern), including its required and recommended components.
However, there is one peculiarity you should be aware of. Removing a pattern does not, as you might expect, uninstall the packages it originally brought in. Instead, the individual packages remain installed unless you remove them manually or they become orphaned due to other dependency changes. So, if you execute:
sudo zypper rm -t pattern cinnamonCode language: Bash (bash)

Only the pattern itself will be removed, but not the packages it includes. In other words, removing the pattern removes only that metadata, not the hundreds of real Cinnamon packages installed earlier. To remove them, you will have to do it manually for each one.
Conclusion
In this guide, I showed you the essential Zypper commands for managing software on openSUSE effectively. Now you know how to install, update, search for, and remove packages, work with patterns, and control repositories from the command line.
Yes, YaST is a great GUI tool that can handle all of this, but knowing Zypper gives you the deeper understanding you need so you don’t rely solely on graphical tools. And while YaST covers everything in a desktop environment, mastering Zypper at the command line is essential for managing software on the server.
Of course, the Zypper package manager provides many more options. I strongly advise you to familiarize yourself with them in the official openSUSE documentation or on the SUSE website.
Thanks for your time. As always, your comments are most welcome.
