zypper: command not found

SUSE, like Red Hat, using RPM for package management. But instead of using yum, they use another tool set with Zypp (also known as libZypp) as backend. Software management can be done with the graphical configuration software YaST or the command-line interface tool Zypper.

zypper command line options

Important basic parameters are:

Command Description
zypper search Search for software
zypper install Install software
zypper remove Remove software
zypper update Update software
zypper dist-upgrade Perform a distribution upgrade
zypper info Show information

If you encounter the below error while running the zypper command:

zypper: command not found

you may try installing the zypper package as per your choice of distribution.

Distribution Command
Debian apt-get install zypper
Ubuntu apt-get install zypper
Kali Linux apt-get install zypper
Fedora dnf install zypper
Raspbian apt-get install zypper

zypper Command Examples

1. Synchronize list of packages and versions available:

# zypper refresh

2. Install a new package:

# zypper install package

3. Remove a package:

# zypper remove package

4. Upgrade installed packages to the newest available versions:

# zypper update

5. Search package via keyword:

# zypper search keyword

6. Show information related to configured repositories:

# zypper repos --sort-by-priority

7. To list the available patterns, use:

# zypper patterns

8. To install them, use:

# zypper install --type pattern [pattern]

9. You can add repositories with the addrepo parameter, for instance: To add a community repository for the latest PowerShell version on LEAP 15.0:

# sudo zypper addrepo \
  https://download.opensuse.org/repositories\
  /home:/aaptel:/powershell-stuff/openSUSE_Leap_15.0/\
  home:aaptel:powershell-stuff.repo 
Related Post