Skip to main content
Zypper is the powerful command-line package manager for SUSE Linux and openSUSE, providing functionality similar to YUM and APT. It enables you to install, update, and remove packages, automatically resolving dependencies. Because Zypper relies on up-to-date repository metadata, it’s best practice to refresh before performing searches or installations.
You need sudo privileges to run Zypper commands that modify the system.
Always refresh metadata to ensure you get the latest package versions.

Refreshing Package Metadata

Before you search or install packages, update metadata from all enabled repositories:
This fetches the latest repository data so Zypper can see available package versions.

Searching for Packages

Use the se (search) command to find packages by name or keyword:
Sample output:

Listing Installed Packages

To list all installed packages:
To check if a specific package (e.g., firefox) is installed:
Example when Firefox is installed:

Installing Packages

From Repositories

Install a package from enabled repositories with the in (install) command:
Interactive example:

From a Local RPM

To install an RPM file stored on your machine:
Zypper will attempt to resolve dependencies against your enabled repositories.

Removing Packages

Use the rm (remove) command to uninstall a package and any packages that depend on it:
Example:
Removing packages may also uninstall dependencies required by other applications. Double-check the list before confirming.

Managing Software Repositories

Listing Repositories

Display all configured repositories and their status:
Sample output:
Enabled = Yes means active; No means disabled.

Enabling, Disabling, and Auto-Refresh

CommandDescription
zypper modifyrepo -d <repo-alias>Disable a repository
zypper modifyrepo -e <repo-alias>Enable a repository
zypper modifyrepo -f <repo-alias>Enable auto-refresh for a repo
zypper modifyrepo -F <repo-alias>Disable auto-refresh for a repo
Example:

Adding and Removing Repositories

  • Add a new repository:
    Sample output:
  • Remove a repository:
    Sample output:

Watch Video