Managing OpenSUSE packages with zypper

LPIC1-101LINUXOPENSUSE

2/17/2026

Zypper configuration files and repositories:

$ ls /etc/zypp/zypper.conf

$ ls /etc/zypp/repos.d

List repositories and whether they are enabled or not:

$ zypper lr

Update the repository information prior to installing a package (a refresh):

$ sudo zypper refresh

To install a package:

$ sudo zypper install iotop

$ sudo zypper search -i iotop

(In the output, look for an "i+" that indicates that the package is installed.)

Another way of verifying that a package's installed:

$ sudo which iotop # Important! Only works with "sudo"

/usr/sbin/iotop

$ sudo zypper what-provides /usr/sbin/iotop

(Look for the "i+" for the package, it means the package is installed.)

A more recent version of this command is:

$ sudo zypper search --provides --match-exact

If you need to update a package, use the update sub command on zypper:

$ sudo zypper update iotop

(or just remove the package name to update all packages of the system)

To uninstall a package:

$ sudo zypper remove iotop

$ sudo zypper search -i iotop

(to verify that the package was removed)

Also, to know whether a package is installed or not, with more information about the package:

$ zypper info iotop

(There's also the package information and the name of the repository)

Verify that all the dependencies are installed:

$ sudo zypper verify

Show any available updates for your installed packages:

$ sudo zypper list-updates

Show all the options for the zypper command (besides the usual man zypper):

$ zypper | less