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:
>sudozypper install PACKAGE_NAME>sudozypper remove PACKAGE_NAME
zypper install MozillaFirefoxInstall a package using its exact name.
zypper install MozillaFirefox-92Install a package by its exact name and version number.
zypper install mozilla:MozillaFirefoxInstall a package by its exact name from a specific repository (where
mozillarefers 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 firefoxInstall a package by the capability it provides. In this example, the
firefoxcapability 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):>sudozypper install 'firefox>=74.2'You can also combine a hardware architecture and version requirement:
>sudozypper install 'firefox.x86_64>=74.2'zypper install /tmp/install/MozillaFirefox.rpmandzypper install http://download.example.com/MozillaFirefox.rpmInstall a package using a local or remote RPM file.