A much easier way to upgrade openSUSE Leap

For years and years I have been using my trusted leapup script to get from one openSUSE release to the next – usually without any problems.

But a moderately recent thread on the openSUSE forums showed me a much easier way… turns out that you can use a variable $releasever in your repo files, and then all you need is to pass that variable to zypper whenever it is time to upgrade.

Here’s an example of a repo file:

nextcloud:/etc/zypp/repos.d # cat system\:snappy.repo  
name=Official repository for the snapd package (snap package manager) (openSUSE_Leap_$releasever)

Once all your .repo files use the variable $releasever instead of a hard-coded version number all you have to do when you upgrade is to pass that variable to zypper… So with all repos prepared one last time the sequence of commands is:

zypper cc --all
zypper --releasever=15.3 ref
zypper --releasever=15.3 dup --download-in-advance --allow-vendor-change

This is going to download first and then install all necessary packages – make sure you have room for it!

After that has finished, reboot.

After the system is back, log in and run updates:

zypper ref
zypper patch
zypper update

and that should actually be about all.

You might want to look for installed packages that are not available anymore and deal with them.

LANG="" zypper se -si |grep "(System"

shows them.

1 thought on “A much easier way to upgrade openSUSE Leap

Leave a Reply

Your email address will not be published.

%d bloggers like this: