KI 2826 How to upgrade Ubuntu to a newer version?
About the Upgrade
An upgrade from 20.04 to 22.04 and 22.04 to 24.04 is possible. This guide is made for both of these cases.If you have sudo access you can complete the upgrade yourself.
it is unlikely that an upgrade should result in data loss, but for safety's sake it recommended to have a backup of important files anyways.
Before the Upgrade
It is important to turn off puppet before the upgrade takes place, so that no changes from UiB-systems can affect the system during the upgrade. You can do this by issuing this command via the terminal:sudo systemctl stop puppet
Before the upgrade can take place you also need to specify which kind of release Ubuntu should be upgraded to. Here is a command you can issue to do so:
sudo sed -i 's/^Prompt=.*/Prompt=lts/' /etc/update-manager/release-upgrades
Upgrade via GUI
To start the upgrade process you can search for "Software Updater"If there is software that needs to be updated before the upgrade process this prompt will appear (click Install Now):
Otherwise the prompt to upgrade will come up:
After you have chosen "Upgrade", you have to confirm twice that you want to upgrade the system.
There will also be a message informing you that the lockscreen has been disabled. It is strongly recommended to not lock the screen during the upgrade. This is because password authentication related modules may stop to work during the upgrade.
The upgrade should start:
You may also receive a message about packages that will be converted to their respective snap versions:
This is not something we can change during the upgrade, but in the end UiB-managed machines should not use the snap version due to an incompatibility with NFS-homes. Just click "Next" for now. If there is an issue with Firefox or Thunderbird after the upgrade, please open a case.
The upgrade will surely come with a number of now removable obsoleted software-packages.
It is up to you to decide if you want to remove obsoleted packages or not. You can find out which software this is about by clicking "Details".
After this you can restart the system and the upgrade is completed.
After the Upgrade
It is recommended to run puppet a few times after the upgrade and run a software update and upgrade to make sure everything is in place:puppet agent -t
puppet agent -t
sudo apt update && sudo apt full-upgrade --auto-remove