Every Linux distribution comes with a default package manager to manage packages. Similar to APT on Debian, Pacman on Arch Linux, and DNF/YUM on RHEL, openSUSE comes with the Zypper package manager.
With Zypper, you can perform several functions from package installation to removal using the command line. Here’s how you can use Zypper and its command-line options to manage packages in openSUSE.

Package Management in openSUSE
Zypper is an easy command-line tool for package management inopenSUSEthat lets you install, remove, and update packages as well as manage repositories. Additionally, you canlist installed packagesand available updates, search for a package, and print information about it.
openSUSE uses the RPM package format. An RPM package usually contains the package name, version, and architecture. There are two command-line ways to manage an RPM package in openSUSE: Zypper and RPM.

You must have root privileges to install, upgrade, or remove any package in your openSUSE system.
Add a Repository in openSUSE
To add a repository in openSUSE, you will need to provide the repository URL and the alias. Alias is the short and easy-to-remember name for the repository.Open the terminaland run Zypper with thear (addrepo)command to add the repository to your system:
For example, to add the Skype repository, run:
The-foption enables auto refresh.
Remove a Repository With Zypper
To remove a repository in openSUSE, use Zypper with therr(removerepo) command and the repository alias as follows:
For example, to remove the Skype repository, the command would be:
Refresh Repositories With Zypper
To manually refresh the repositories, run:
This command lets you fetch changes in the packages from configured repositories.
List All Repositories in openSUSE
To list all defined repositories, use Zypper with thereposorlrmethod:
This command displays information about the repositories such as their name and status (enabled or disabled).
Install a Package in openSUSE With Zypper
To install a package, use the zypper command followed by thein (install)method and the package name:
For instance, to install Skype on openSUSE, the command would be:
You can also install multiple packages simultaneously by providing a space-separated list of the package names:
Search for a Package With Zypper
By default, Zypper searches for a package in all repositories, i.e., both in the installed packages list and among those that are not installed yet. To search for a particular package in all repositories, use these (search)command with Zypper:
Use the-soption to view detailed information about a package:
To search for a package in only installed packages list, use:
List Installed Packages in openSUSE
With Zypper, you’re able to also query the package database to discover what is currently installed on your openSUSE system. To do this, use Zypper with-i (–installed-only):
you may also save this list by redirecting its output to a file:
To find detailed information about a particular installed package, use:
Remove a Package in openSUSE With Zypper
Removing a package with Zypper is as easy as installing it. To remove a package that you no longer need, use Zypper with therm (remove)method and the package name:
Update a Package With Zypper
Keeping the packages up to date is the most common package management activity. Using Zypper, you can view and install all the available updates. Run the following to view all the available updates for the installed packages:
Once you have got the list, you now have the option to either update all packages or just a single package. To update all the installed packages that have any newer versions available, use theup (update)command:
To update individual packages, specify the package with either the update or install command:
Install Local Packages in openSUSE With RPM
For the local RPM packages you have manually downloaded, you can either use the RPM utility or Zypper to install them. Use the following format to install it using RPM:
To install an RPM package using Zypper, use:
There are several other command-line options you may use with Zypper to accomplish various tasks. You can view all the options using the help command:
Zypper Simplifies Package Management in openSUSE
Zypper is a simple yet powerful command-line tool that lets you manage packages in openSUSE. In addition to command-line tools like Zyyper and RPM, you can also use YaST (Yet Another Setup Tool), a GUI-based tool for managing packages and other system configuration tasks.
Snap and Flatpak are great alternatives to traditional package managers and let you install and manage packages without the need to manually handle the dependencies.