To update all installed packages with newer available versions, use: A list of all new available packages regardless whether installable or not can be obtained with: For details, refer to Section 6. Then use the zypper dist-upgrade command with the required repositories. This command ensures that all packages will be installed from the repositories currently enabled.
For detailed instructions, refer to Section 6. To restrict the distribution upgrade to packages from a certain repository while considering also the other repositories for satisfying dependencies, use the --from option and specify the repository by either its alias, its number or URI. Differences between zypper update and zypper dist-upgrade Choose zypper update to update packages to newer versions available for your product version while maintaining system integrity.
This rule is enforced, so packages might change vendor or architecture or even might get downgraded. All packages that have unfulfilled dependencies after the upgrade will be uninstalled. Most importantly, you can initiate the system upgrade process from within the running system. This feature is attractive for advanced users who want to run remote upgrades or upgrades on many similarly configured systems.
Before Starting the Upgrade with zypper To avoid unexpected errors during the upgrade process using zypper, minimize risky constellations. Close as many applications and unneeded services as possible and log out all regular users. Disable third party repositories before starting the upgrade, or lower the priority of these repositories to make sure packages from the default system repositories will get preference. Enable them again after the upgrade and edit their version string to match the version number of the distribution of the upgraded now running system.
Make sure to have the system registered. This will add update sources to the system. Perform Upgrades from Reboot The upgrade process has to be done completely from beginning to reboot. There is only a limited chance to revert changes. Furthermore, the server has to be connected online during the whole process. Check Your System Backup Before actually starting the upgrade procedure, check that your system backup is up-to-date and restorable.
This is especially important because you must enter many of the following steps manually. Registration Key If add-ons are installed on your system, you might need to enter your registration key in order to update the system. Be prepared to have the key available. The program zypper supports long and short command names. For example, you can abbreviate zypper install as zypper in. In the following text, the short variants are used. Log in as root and perform the following steps: Refresh all services and repositories: Repeat Step 2 to install all available updates for your system.
If you want o use the above command in a script for an unattended upgrade, use the command: The installed products contain information about distribution upgrades and which migration products should be installed to perform the migration.
Install them with the following commands: Extract the product information: In order to avoid dependency conflicts during upgrade, enable this repository before performing the actual upgrade. On SLES this extra step is not needed. Refresh services and repositores: Zypper will report that it will delete the migration product and update the main products. Confirm the message to continue updating the rpm packages. After the upgrade is finished, register the new products again: To list all repositories known to the system, use the command: A repository alias is a short version of the repository name for use in repository handling commands.
Note that the repository numbers can change after modifying the list of repositories. The alias will never change by itself. By default, details such as the URI or the priority of the repository are not displayed. Use the following command to list all details: To only show enabled repositories, use the following command: This GPG check is enabled in the repository configuration file on the server that provides the repository.
Zypper also informs the user about GPG Check option: If set to No your system can possibly be compromised by, for example, package downgrades that re-introduce previously fixed vulnerabilities. It is recommended not to trust repositories where this option is set to No. The alias is a shorthand and unique identifier of the repository. You can freely choose it, with the only exception that is has to be unique. Zypper will issue a warning if you specify an alias that is already in use.
Removing Repositories If you want to remove a repository from the list, use the command zypper removerepo together with the alias or number of the repository you want to delete. For example, to remove the repository listed as third entry in Example , use the following command: You can also alter the repository's properties such as refreshing behavior, name or priority with this command. The following command will enable the repository named updates, turn on auto-refresh and set its priority to The following example changes the alias from Mozilla Firefox to just firefox: To get lists of all products, patterns, packages or patches available, use the following commands: It works on package names, or, optionally, on package summaries and descriptions.
By default, the search is not case-sensitive. For example, if you would like to know which package provides the perl module SVN:: Core, use the following command: Core ' To query single packages, use info with an exact package name as an argument. It displays detailed information about a package. Zypper, on the other hand, will tell you about providers of the capability from any repository, not only those that are installed.
Refer to the comments in the file for help about the available options. These snapshots can be used for reverting any changes made by zypper. For more information about snapper, see man snapper. Zypper and YaST currently only make snapshots of the root file system. Other subvolumes cannot be configured. This feature is not supported on the default file system.