SDB:System upgrade to Leap 15.5

Jump to: navigation, search
This guide shows how to use Zypper to do a live distribution upgrade of openSUSE Leap 15.4 to openSUSE Leap 15.5.

A live upgrade from the prior version is officially supported. This allows to perform a complete operating system upgrade in place, without reloading everything from scratch.


This page explains how to run a series of command line steps to live upgrade your Leap 15.4 system to the latest openSUSE Leap 15.5.

Doing a live upgrade has advantages as well as disadvantages.

Among the advantages are:

  • You only download the packages that need to be upgraded, thus using a lot less bandwidth.
  • During the upgrade, you can still use your workstation (even if this is not recommended); the only downtime will be the reboot after the upgrade.
  • You do not have to use a DVD, nor do you need a DVD writer. You do not have to use a USB key. This because you boot your existing system, and install everything from the net.

The disadvantages:

  • If, for any reason, the upgrade is interrupted (e.g. power outages, network disconnect) and the process cannot continue, you could be left with a broken system (that depends on where the process stopped of course).
  • If you have multiple systems to upgrade, you use bandwidth each time, so it might be better to download an ISO image.
  • It does not do all of the cleanup and maintenance that an offline DVD Upgrade does.

Other possibility: Offline upgrade, a.k.a. traditional or DVD upgrade. For more information, read offline upgrade. This upgrade method is safer and more versatile. Unless you have a good reason to do otherwise, use the offline upgrade method.

Find out what version of openSUSE you currently have as follows:

lsb_release -d

Be aware that, in principle, this upgrade process is considered “best effort” only. This means that due to some third-party packages and the myriad of possible configurations, it is possible for some combinations to cause failure upon upgrade.

Warning: Do not skip a release when upgrading! Example: do not upgrade from 15.3 to 15.5. Instead, from 15.3 upgrade to 15.4, and only then from 15.4 to upgrade to 15.5.

If you're interested in migration from openSUSE Leap to SUSE Linux Enterprise. Then please follow our guide for migrating to SUSE Linux Enterprise.

Extra repositories handling

The supported starting point does not necessarily include arbitrary openSUSE Build Service repositories you may have added. Before Leap 15.2, we recommended that you disable all OBS repositories first, perform the upgrade, then reenable them.

Zypper dup can now better handle extra repositories during upgrade. Removing a repository causes the problem that every package that was installed from it will revert to another repository (if found), or deleted, or left at the old version, depending on the administrator choices. It may be a better method to leave the repository active. A typical example would be Packman.

However, a system upgrade can be the perfect occasion to remove some repositories, as too many repositories complicates maintenance. For example, suppose we have some Xfce or Plasma repository we activated to get newer versions (say we needed a feature or correct a problem that was handled in a newer version): now would be the perfect occasion to revert to the mainline version. It would be the chance to consider removing all HOME repositories that we really do not need.

Each repo we remove will cause zypper to ask what to do with packages installed from them: keep or upgrade with vendor change. The policy would be "keep" if we intend to add back the repository after system upgrade, or "update" otherwise. We could use "--allow-vendor-change" but this may have unintended consequences as zypper will then evaluate if any package would be better to obtain a version from another repo, considering the priorities they have.

Thus, you have to choose what road to take, as the administrator ;-)


Make sure that you read the list of annoying bugs for the new version you are going to install. Some of them could affect the update process. Usually, some solution or workaround is listed alongside the bug, so make sure that you are prepared for upcoming problems.

Also, read the Release Notes which list changes and glitches in the new release.


Backup all data you do not want to loose!

We recommend to use btrfs based installation and snapper openSUSE:Snapper_Tutorial for effortless rollback. Installing rollback-helper will help you to cleanup SCC in case that you'd like to revert filesystem changes and the entire registration process.

Making sure you are up to date

The supported starting point is openSUSE Leap 15.4 with all current updates applied. The following steps show you how to update your openSUSE distribution to the current packages before upgrading to the next version.

Since openSUSE Leap 15.3 there are three update repositories. This is explained in the Release notes:

1. Check if the 3 update repositories already exist and are enabled and update before upgrading.

zypper repos -u

Check if repos with the following 3 URIs exist, which should have Yes in column Enabled, like the example below,

#  | Name                      | Enabled | Refresh | URI
1  | repo-update               | Yes     | Yes     |
2  | repo-backports-update     | Yes     | Yes     |
3  | repo-sle-update           | Yes     | Yes     |

If the Enabled column says No, enable it by issuing the command

zypper modifyrepo --enable repo-update
where ‘repo-update’ is the name of the update repository.

If all 3 exist and have been enabled, continue to step 3.

2. Add update-repository

Add the missing repos:

zypper addrepo --check --refresh --name 'repo-update' repo-update
zypper addrepo --check --refresh --name 'repo-backports-update' repo-backports-update
zypper addrepo --check --refresh --name 'repo-sle-update' repo-sle-update

3. Move /var/cache to a separate subvolume

This step is not applicable for Leap 15.3 and newer.

4. Update system to the latest packages

zypper refresh
zypper update

For more information, read Zypper Usage.

5. Update the repos

Check if your Leap repos defined in /etc/zypp/repos.d/ are using the $releasever variable already in the URIs.

This can be done with

grep baseurl /etc/zypp/repos.d/*.repo | grep -v releasever

If they are still hard-coded with a particular Leap version number, then you need to modify them first. This can be done with

sudo sed -i 's/15.4/${releasever}/g' /etc/zypp/repos.d/*.repo

6. Refresh with the new repos

Refresh all repositories to the new 15.5

zypper --releasever=15.5 refresh

Note: Refreshing does not permanently change the releasever variable yet!

When refreshing for the new 15.5, I got errors like:

Repository 'network' is invalid.
[network|] Valid metadata not found at specified URL

This is caused by the relocation of some repos as follows:

Be sure to correct any repositories that are not found: it would be best to just disable them.

7. Execute the full distribution upgrade

Now execute the full distribution upgrade.

Warning: It is strongly recommended that you run the upgrade outside the X-window graphical mode. Thus it is recommended you run the command from either runlevel 3 (text + network), or a virtual console. Unfortunately many times the WIFI connection is managed/available only in runlevel 5, so a virtual text console may be best while staying logged into the graphical console behind the scenes. People had their X session stopped/crashed during the upgrade, causing the upgrade to abort, which in turn left the system in an inconsistent state. To change to runlevel 3, see SDB:Switch_runlevel. To remain in runlevel 5, but use a "virtual console", type control-alt-F1 (as an example).
zypper --releasever=15.5 dup --download-in-advance

With the above command, zypper will download all packages in advance - which is more reliable if your internet connection may fail.

Once the dup is finished, openSUSE sets the releasever variable to the new version.

If you did the above dist upgrade before the official release date, you may have installed a Release Candidate (RC) or a milestone version and will need to repeat the final zypper dup step now to receive the final release.

8. Reboot

After upgrading, a reboot is recommended to start the new kernel and newer versions of everything.


Discover and enjoy :)

In addition, zypper up can be run from time to time to ensure you have the latest available packages from the various repositories that you have enabled. YOU (Yast Online Update) only addresses security updates from the official repositories.