Achtung: Beim Update auf eine LTS von einer LTS – hier 20.04->22.04.1 – erst im August !!!
The first thing you need to do is run a standard update and upgrade to make sure all of the software installed on the machine is at the latest version. Log into your Ubuntu Server instance and issue the following two commands:
sudo apt-get update
sudo apt-get upgrade -y
When that completes, run the dist-upgrade command like so:
sudo apt-get dist-upgrade -y
Next, remove any packages that are no longer required with:
sudo apt-get autoremove -y
This is a good opportunity to remind you to back up your data and make sure you’re running this on a non-production machine.
We now need to install the update-manager-core package that allows us to upgrade from one release to another. To install this package, issue the command:
sudo apt install update-manager-core
Now, we can run the actual upgrade. Since Ubuntu 22.04 is still in beta, there is no official release available, so we have to force the upgrade. After April 21, 2022 (the planned date for the official release), you won’t have to use the -d flag. While 22.04 is still in beta, the upgrade command is:
sudo do-release-upgrade -d