Zypper
Zypper (SUSE package Manager)
Help
zypper help <command>
help for Install command
or
Search
refresh
This is one of the most common functions of zypper to keep its local package database updated with the package server
or
Note:It’s also possible to force zypper to rebuild its local database. This can be useful in situations, for example, if the database is corrupted.
Update
To grab and install all the latest package updates from openSUSE, run the following command.
Recomend use command Like This:
Upgrade
Upgrade Suse Using Zypper
checkout the packages that have updates available
Install
or
Multiple
non intercative
all
Install a rpm package (say teamviewer).
dry-run
Most Zypper commands have a dry-run option that does a simulation of the given command. It can be used for test purposes.
Remove
non interactive :
or
Cleaning Up Dependencies of Removed Packages
Patch
In the case of “update”, in openSUSE’s term, will update the package to the latest version available from the repo. In the case of “patch”, however, it will only install package updates that are meant for bug and security fixes.
If you only install patches, it may or may not update all the packages. However, performing updates will make sure that all the latest packages are installed.
To see the list of available patches, use this one. It doesn’t require root permission to run.
Number of Needed Patches
Auto agree to Licenses/Agreements.
To install all patches relating to a specific Bugzilla issue, use:
To install all patches relating to a specific CVE database entry, use:
For example, to install a security patch with the CVE number CVE-2010-2713, execute:
List patches
Zypper can list all the patches that are not currently installed. Run the following command.
or
To check the number of patches that are required, run this command.
Repository management
We can also use “lr”, the abbreviated form of “repos”.
List zypper URI on the table
Repos can be enabled/disabled without deleting them. In order to disable a particular repository, run the following command. Note that we need the repo number from the repository list.
sudo zypper mr -d <repo_number>
Need to enable a disabled repo? Let’s run the following command.
Add repo
sudo zypper addrepo <repo_URI>
Remove repo
Rename repo
Cache management
Caching is a useful mechanism where zypper can keep a copy of all the RPM packages it grabs from the internet in a specific location. Any time you ask zypper to install the same package, it first looks into the cache. If it’s in the cache, zypper uses the RPM package from the cache to perform the installation. This way, it can speed up the installation and save time and bandwidth.
The cache is stored in the following location. Each repo has its own dedicated folder under the directory.
For cleaning the cache, run the following command.
This will clean all the stored RPM packages from the cache. I recommend enabling caching unless you’re somehow constrained by the storage. The following command will enable caching for all the repositories in the system.
disable
shell
Utilities
To verify whether all dependencies are still fulfilled and to repair missing dependencies, use:
Resource
Last updated