How to in-place upgrade from Suse Leap 42.1 to Leap 42.2…

Following along in my line of “Readers Digest” versions of the official Opensuse upgrades procedures (here are a couple of my past ones: 11.1, 11.2, 11.4, 12.1, 12.2, 12.3, 13.1, 13.2, 42.1), here’s the latest for upgrading in-place from Suse Leap 42.1 to Leap 42.2 below. Just be sure to run each of these lines one-at-a-time, not like a script.

And please… if you don’t know what you’re doing, please don’t do this. This process does not take many special conditions into account, since it is a simplified version. There’s a link at the end for the official documented instructions if you need further help. Now, let’s get to it:

# Make a snapshot before you proceed!
# Run the following as the root user, or insert all your sudo commands if you like
# Please ensure you have space to do an upgrade!
df -h
# If you can, do a final update (if the repos still exist)...
zypper ref;zypper up
# Now check your repos. Look for anything custom, and note it for later if so...
zypper lr --url
# Now, we actually do the UPGRADE…
# Disable all the old repos...
zypper modifyrepo --all --disable
# Now set up the new repos for 42.2...
zypper addrepo --check --refresh --name 'openSUSE-42.2-Update' repo-42.2-update
zypper addrepo --check --refresh --name 'openSUSE-42.2-Update-Non-Oss' repo-42.2-update-non-oss
zypper addrepo --check --refresh --name 'openSUSE-42.2-OSS' repo-42.2-oss
zypper addrepo --check --refresh --name 'openSUSE-42.2-Non-OSS' repo-42.2-non-oss
# Verify that the repos look right
zypper lr --uri
# Import the keys for the repos and refresh the local cache…
zypper --gpg-auto-import-keys ref
# Do a Distribution UPgrade... and I like the option to download all the packages first, before installation...
zypper dup --download-in-advance
# Now, make a list of the old disabled repos; they might be a combination of 12.3 and 13.x on some systems, if they weren't cleaned before...  Whoops...  ;)
zypper lr
# Remove all the old repos, for example...
zypper rr repo-42.1-non-oss repo-42.1-oss repo-42.1-update repo-42.1-update-non-oss 
# And now that the upgrade is done, add back any custom repos at this point (optional, depends on your environment) 
# One more check to be sure that only the desired 42.1 repos remain...
zypper lr --uri
# And reboot (and watch from a console)...
init 6

My advice is to make sure you have multiple terminal sessions during the upgrade, in case something goes a little strange, and make sure you have space for the kernel and all the files.

Thanks to the folks at Suse, and here’s the “long and detailed” guide that I adapted this from:


Leave a Comment

Your email address will not be published. Required fields are marked *