Installing and removing software with Zypper reference
1 Environment #
This document applies to the following products and product versions:
SUSE Linux Enterprise Server 15 SP5, 15 SP4, 15 SP3, 15 SP2, 12 SP5
SUSE Linux Enterprise Server for SAP Applications 15 SP5, 15 SP4, 15 SP3, 15 SP2, 12 SP5
SUSE Linux Enterprise High Availability 15 SP5, 15 SP4, 15 SP3, 15 SP2, 12 SP5
SUSE Linux Enterprise High Performance Computing 15 SP5, 15 SP4, 15 SP3, 15 SP2
SUSE Linux Enterprise Desktop 15 SP5
SUSE Linux Enterprise Real Time 15 SP5
2 Install and remove packages with Zypper #
The following two basic commands can be used to install and remove packages:
>
sudo
zypper install PACKAGE_NAME>
sudo
zypper remove PACKAGE_NAME
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):>
sudo
zypper install 'firefox>=74.2'You can also combine a hardware architecture and version requirement:
>
sudo
zypper install 'firefox.x86_64>=74.2'zypper install /tmp/install/MozillaFirefox.rpm
andzypper install http://download.example.com/MozillaFirefox.rpm
Install a package using a local or remote RPM file.