Jump to content

Installing and removing software with Zypper reference

Publication Date: 09/24/2021

1 Environment

  • File Name: reference-zypper-install.xml
  • ID: environment-zypper-install

This document applies to the following products and product versions:

  • SUSE Linux Enterprise Server 15 SP3, 15 SP2, 15 SP1, 15 GA, 12 SP5, 12 SP4, 12 SP3

  • SUSE Linux Enterprise Server for SAP Applications 15 SP3, 15 SP2, 15 SP1, 15 GA, 12 SP5, 12 SP4, 12 SP3

  • SUSE Linux Enterprise High Availability Extension 15 SP3, 15 SP2, 15 SP1, 15 GA, 12 SP5, 12 SP4, 12 SP3

  • SUSE Linux Enterprise High Performance Computing 15 SP3, 15 SP2, 15 SP1, 15 GA

  • SUSE Linux Enterprise Desktop 15 SP3, 15 SP2, 15 SP1, 15 GA, 12 SP5, 12 SP4, 12 SP3

  • SUSE Linux Enterprise Real Time 15 SP3, 15 SP2, 15 SP1, 15 GA, 12 SP5, 12 SP4, 12 SP3

2 Install and remove packages with Zypper

  • File Name: reference-zypper-install.xml
  • ID: zypper-install-remove-options

The following two basic commands can be used to install and remove packages:

tux > sudo zypper install PACKAGE_NAME
tux > sudo zypper remove PACKAGE_NAME
Selecting packages to install or remove
zypper install MozillaFirefox

Install a package using its exact name.

zypper install MozillaFirefox-92

Install a package by its exact name and version number.

zypper install mozilla:MozillaFirefox

Install a package by its exact name from a specific repository (where mozilla refers to the desired repository).

zypper install 'Moz*'

Install a package using wild cards in its name. The example command above installs all packages which names start with Moz.

zypper install firefox

Install a package by the capability it provides. In this example, the firefox capability is provided by the MozillaFirefox package, thus running the command installs this specific package. For more information on the concept of capability, refer to "Capability concept".

zypper install 'firefox.x86_64'

Install a package by its capability, hardware architecture and version. Versions must be appended to the end of the string and must be preceded by an operator: < (lesser than), <= (lesser than or equal), = (equal), >= (greater than or equal), > (greater than):

tux > sudo zypper install 'firefox>=74.2'

You can also combine a hardware architecture and version requirement:

tux > sudo zypper install 'firefox.x86_64>=74.2'
zypper install /tmp/install/MozillaFirefox.rpm and zypper install http://download.example.com/MozillaFirefox.rpm

Install a package using a local or remote RPM file.

Print this page