openSUSE Leap 15.2 has been end-of-life (EOL) since January 4, 2022, and users still using the system will not receive any kind of security and maintenance updates in the future. All users are advised to upgrade their systems to - openSUSE Leap 15.3 as soon as possible, which will receive security patches and updates until November 2022. The next release of openSUSE Leap 15.4 is also expected to be released in June 2022.

Those who prefer a rolling update version can also take the opportunity to switch from the Leap version to the Tumbleweed version.

Version upgrades for openSUSE Leap can be done online via the Internet or offline by downloading the latest version of the ISO file, in which we will look at how to upgrade online.

OPENSUSE LEAP online upgrade

The advantages of using the online upgrade are as follows.

  • You only need to download the packages that need to be updated, which will save a lot of bandwidth
  • You can still use the system during the upgrade, although it is not recommended, but only after the upgrade is completed you need to reboot
  • Because you don’t need to download the ISO image file, you don’t need a DVD drive or burn a USB boot disk, all you need is the network.

Of course, the online upgrade has the following disadvantages.

  • If, for some reason, the upgrade process is interrupted (e.g. sudden power failure, network disconnection), the upgrade process cannot continue, which may leave a corrupted system
  • If there are multiple systems to upgrade, then downloading the ISO image may be more bandwidth efficient

Note , if you are using an older version of Leap, such as 15.1, please upgrade to 15.2 first before upgrading to 15.3.

You can use the following command to check the current version.

1
2
> lsb_release -d
Description:     openSUSE Leap 15.2

Although a normal upgrade will not result in the loss of user data, it is recommended that you back up your important personal data before upgrading for security purposes.

Preparation before upgrading your system

First check if the update source exists and update the package for the current release

1
2
3
4
5
# zypper repos --uri
...
29 | repo-update                   | 主更新源                                                                              | Yes     | (  ) No   | No      | https://mirrors.tuna.tsinghua.edu.cn/opensuse/update/leap/15.2/oss/
30 | repo-update-non-oss           | 主更新源(非开源软件)                                                                 | Yes     | (  ) No   | No      | https://mirrors.tuna.tsinghua.edu.cn/opensuse/update/leap/15.2/non-oss/
...

Here I use the mirror source from Tsinghua University (https://mirrors.tuna.tsinghua.edu.cn/) If the update source already exists as above, proceed to the next step; if there is no update source, please add it.

1
# zypper addrepo --check --refresh --name 'openSUSE-Leap-15.2-Update' http://download.opensuse.org/update/leap/15.2/oss/ repo-update

Move /VAR/CACHE to a separate SUBVOLUME

Note, if the root filesystem of your system is not of type Btrfs, you can skip this step.

  • Find the device name of the root file system.

    1
    2
    3
    
    # df /
    Filesystem     1K-blocks     Used Available Use% Mounted on
    /dev/sdb3       62914560 37723280  24393296  61% /
    
  • Determines the parent volume of all other child volumes.

    1
    
    # btrfs subvolume list /
    

    Generally it should be @.

  • Mounts the specified subvolume to a temporary mount point.

    1
    
    # mount /dev/sdb3 -o subvol=@ /mnt
    
  • To avoid data loss, back up the cache.

    1
    
    # mv /mnt/var/cache /mnt/var/cache.old
    
  • Create a new subvolume and move the cache back.

    1
    2
    3
    4
    
    # btrfs subvol create /mnt/var/cache
    
    # mv /mnt/var/cache.old/* /mnt/var/cache/
    # rm -rf /mnt/var/cache.old
    
  • Unmount the temporary mount point and add the new cache subvolume to /etc/fstab.

    1
    
    # umount /mnt
    

    Add the following entry to /etc/fstab.

    1
    
    UUID=4f648797-078d-426f-b103-51d9a73dd937       /var/cache    btrfs   subvol=/@/var/cache   0       0
    

    The UUID here should be the same as for the root filesystem.

    1
    
    # mount /var/cache
    

Update the current system package to the latest

1
2
3
# zypper ref

# zypper update

Perform release upgrade -> 15.3

  • Update the software source version.

    1
    
    # sed -i 's/15.2/${releasever}/g' /etc/zypper/repos.d/*.repo
    
  • Refresh all software sources

    1
    
    # zypper --releasever=15.3 ref
    

If, in the meantime, you find that some of the OBS repositories you have added are not available, you can disable them first.

  • Finally, you can perform a version upgrade of the distribution.

    1
    
    # zypper --releasever15.3 dup
    

You may be asked about some package provider changes, as we may have previously installed a more recent version of the package using another software source, we just need to select the appropriate option and will end up with the following prompt.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
The following NEW product is going to be installed:
  "openSUSE Leap 15.3"

The following product is going to be REMOVED:
  "openSUSE Leap 15.2"

The following package requires a system reboot:
  kernel-preempt-5.3.18-59.10.1

2732 packages to upgrade, 876 to downgrade, 394 new, 75 to remove, 2430  to change vendor.
Overall download size: 3.14 GiB. Already cached: 0 B. After the operation, 17.4 MiB will be freed.

    Note: System reboot required.
Continue? [y/n/v/...? shows all options] (y):

Hit a ‘y’ and enter, and the long (but depending on your network environment and the source image address used) download and installation process begins. You can still use your system during the upgrade process.

After completing all the downloads and installations, you will be asked to reboot your system, close all your applications, then reboot your system and you will get a new version (Leap 15.3) of openSUSE.

1
2
> lsb_release -d
Description:    openSUSE Leap 15.3

After that you can go ahead and add the OBS repositories you need to use (corresponding to version 15.3, of course) to install other packages.

Summary

The Leap distribution is a regular release of openSUSE, basically a minor update once every 12 months, e.g. from 15.2 -> 15.3 -> 15.4; and a major update every 36-38 months, e.g. 15.x -> 16.x .

openSUSE also distributes Tumbleweed releases, which are rolling update releases, and its repositories provide all the latest packages for rolling upgrades.

Here we see how to upgrade a Leap version, the process is not too complicated, to summarize it is to update the repository version and then update it via zypper dup, I have been using openSUSE for years and almost every version has been upgraded this way.

To be honest, among all the Linux desktop distributions, openSUSE is not popular, but my experience is that it is very stable and with the KDE desktop environment, it is also a very elegant and beautiful Linux distribution. If you also like to use the Linux desktop for office work, you may want to try it.