How To Upgrade Ubuntu 20.04 LTS to Ubuntu 22.04 LTS
In this article, we are going to upgrade an Ubuntu 20 Focal Fossa VPS Server to Ubuntu 22 Jammy Jellyfish. Ubuntu 20 LTS was released back in April 2020 and is scheduled to receive maintenance and security updates until April 2025. At this point, Ubuntu 20 will become end-of-life (EOL) and future updates will stop. In anticipation of the EOL of Ubuntu 20, you can use our guide to upgrade from Ubuntu 20 to Ubuntu 22 LTS.
Before starting the upgrade process, it’s important you have a backup to fall back to. The process of upgrading between Ubuntu versions is well-tested but things can go wrong. Take a backup of your VPS Server or a Snapshot so you can roll back any changes easily.
Upgrade Ubuntu 20.04 LTS to Ubuntu 22.04
First, ensure your Ubuntu 20 VPS is fully updated. If packages are updated, reboot after this is complete.
apt update && apt upgrade -y
Once the server is fully updated issue the sudo do-release-upgrade command. You will be prompted to start an additional SSH daemon on port 1022. Press Y to confirm this.
sudo do-release-upgrade
The upgrade to Ubuntu 22.04 LTS takes around 550MB. So, in the console, you will now be shown how many packages will be updated. Issue Y to confirm the upgrade to Ubuntu 22.
Confirm Upgrade To Ubuntu 22
Finally, once the upgrade process has been completed you will be presented with packages that are no longer used and can be removed from the server. Confirm this with Y and reboot the server. Log back into the server and issue the below commands.
uname -mrs
lsb_release -a
So, you should now see the Ubuntu 22.04 kernel Linux 5.15.0-94-generic x86_64 and also, lsb_release should now report your system as Ubuntu 22.04.4 LTS.
Your Linux Server has now been upgraded to Ubuntu 22.04 LTS.