Home Wiki > SDB:System upgrade
Sign up | Login

SDB:System upgrade

tagline: From openSUSE

This guide shows how to use Zypper to do a live distribution upgrade of openSUSE.
Tested on openSUSE Recommended articles Related articles

Icon-manual.png Icon-help.png
Version: 11.2+Starting with openSUSE 11.2, 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 tool or a series of command line steps to upgrade your system to the latest version of openSUSE.

Doing a live-upgrade has advantages but on the flip-side, there are major 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 also could boot from the net or a USB key, and install the rest from the net...)

The disadvantages:

  • If for any reason the upgrade is interrupted (e.g: power outages, network disconnect) and the process can't 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 maitanence that an offline DVD Upgrade does.

Warning: Do not skip a release when upgrading! Example: do not upgrade from 12.3 to 13.2. Instead, from 12.3 upgrade to 13.1, then from 13.1 upgrade to 13.2.

Other possibility: Offline upgrade, aka 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.

Supported scenarios

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.

Also, remember these important rules:

  • All important data must be backed up prior to beginning the upgrade process.
  • You must update your system with the latest updates for the release you are currently running before running zypper dup.
  • You must only zypper dup to the next release. Hopping over a release, e.g., going from 12.2 -> 13.1, is not supported.

Making sure you are up to date

The supported starting point is the last openSUSE release with all current updates applied. This does not include arbitrary openSUSE Build Service repositories you may have added. We recommend that you disable all OBS repositories first, perform the upgrade, then reenable them. The following steps show you how to update your openSUSE distribution to the current packages before upgrading to the next version.

Command line

1. Check if the update repository already exists and is enabled.

zypper repos --uri

Check if http://download.opensuse.org/update/13.1/ (replace 13.1 with your version) exists in one of the URI column values, and Yes in column Enabled, like the example below,

#  | Alias           | Name            | Enabled | Refresh | URI
1  | repo-update     | repo-update     | Yes     | Yes     | http://download.opensuse.org/update/13.1/

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

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

If it exists and has been enabled, continue to step 3.

2. Add update-repository

zypper addrepo --check --refresh --name 'openSUSE-13.1-Update' http://download.opensuse.org/update/13.1/ repo-update
Replace 13.1 above with your current openSUSE version.

3. Update system to the latest packages

zypper refresh
zypper update

For more information, read Zypper Usage.

Graphical tool

See YaST Online Update.

Running the Upgrade

The following steps will show you how to upgrade your openSUSE distribution to the following release (eg. 13.1 -> 13.2). As already mentioned, any third party or OBS repositories can cause troubles, so it is recommended to disable or remove them before proceeding.

Before you begin

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, alongside the bug is listed some solution or workaround, so make sure that you are prepared for upcoming problems.

Command line

As an example, we will be showing upgrade from 13.1 to 13.2 here:

  • Take a look at all repos you have
    zypper lr
    and remove all third party/OBS repos you no longer need
    # zypper rr <alias>
  • Change all remaining repo URLs to the new version of the distribution (needs to be run as root)
    # cp -Rv /etc/zypp/repos.d /etc/zypp/repos.d.Old
    (for a backup copy), then:
    # sed -i 's/13\.1/13.2/g' /etc/zypp/repos.d/*
  • If you are upgrading from 12.1 or older, add non-oss-update repo
    # zypper ar -f http://download.opensuse.org/update/13.2-non-oss/ repo-update-non-oss
  • Refresh new repositories (you might be asked to accept new gpg key)
    # zypper ref
    If you haven't removed third party/OBS repositories you may encounter some errors as these repositories may not exist yet or they may have different unguessable URL. It is always recommended to remove them and add their newer version after upgrade.
  • Now execute the full distribution upgrade.

It is strongly recommended that you run the upgrade not in runlevel 5 (graphical mode) but in runlevel 3 (text + network).

People had their X session crash during the upgrade, causing the upgrade to aborts which leaves the system in an inconsistent state.

To change to runlevel 3, see SDB:Switch_runlevel.

# zypper dup
With the above command zypper will download all required packages and install them in heaps. To download all packages in advance, use:
# zypper dup --download "in-advance"

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

When upgrading to 13.2 you may need to uninstall sysvinit. If presented with a choice like:

Problem: patterns-openSUSE-yast2_basis-13.1-13.6.1.x86_64 requires libyui-ncurses-pkg5, but this requirement cannot be provided                                                                                                                             
 deleted providers: libyui-ncurses-pkg5-2.44.4-2.1.5.x86_64                                                                  
Solution 1: Following actions will be done:                                                                                  
 deinstallation of PackageKit-backend-zypp-0.8.11-2.3.1.x86_64
 deinstallation of PackageKit-0.8.11-2.3.1.x86_64
 deinstallation of PackageKit-branding-openSUSE-13.1-2.2.1.noarch
 deinstallation of apper-lang-0.8.1-11.7.1.noarch
Solution 2: deinstallation of patterns-openSUSE-yast2_basis-13.1-13.6.1.x86_64
Solution 3: deinstallation of sysvinit-2.88+-89.1.2.x86_64
Solution 4: install PackageKit-0.8.17-3.1.3.i586 despite the inferior architecture
Solution 5: keep libyui-ncurses-pkg5-2.44.4-2.1.5.x86_64
Solution 6: keep libyui-ncurses-pkg5-2.44.4-2.1.5.x86_64
Solution 7: break patterns-openSUSE-yast2_basis-13.1-13.6.1.x86_64 by ignoring some of its dependencies

Choose from above solutions by number or skip, retry or cancel [1/2/3/4/5/6/7/s/r/c] (c): 

Make the choice to delete sysvinit.

  • Search for updated openSUSE 13.2 compatible third-party repositories that you used before if you still need them and add them.
    Warning Use with caution. Using third-party repositories may break your system or cause instabilities.
    zypper addrepo --name <name> <url> <alias>
    Or, if you have URL of a .repo file:
    # zypper ar <url.repo>
  • After upgrade, reboot is recommended to start new kernel and newer versions of everything.

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.

Links to other openSUSE or SUSE projects

The openSUSE Forums