Ubuntu Tutorials

How to Upgrade Ubuntu Server 20.04 to Ubuntu 22.04

In this tutorial you will learn how to upgrade your Ubuntu Server 20.04 LTS to Ubuntu Server 22.04 LTS.

Ubuntu 22.04 Dates

Below you can find list of some important dates relating to Ubuntu 22.04 LTS

  • Official Release: April 21, 2022
  • End of Life (end of official support): April 2027
  • Extended Support End of Life (available with subscription): April 2032

What’s New?

Ubuntu 22.04 provides major enhancements, new capabilities, and a number of new software packages such as:

  • PHP 8.1.2
  • OpenSSL 3.0
  • Ruby 3.0
  • Python 3.10.4
  • MySQL 8.0.28
  • PostgreSQL 14.2
  • Linux kernel v5.15.0-25 & MESA 22

For a comprehensive list of all the new features and software packages, check out the release notes.

Prerequisites

  • Make sure to have a minimum of 20GB of available storage.
  • Create a Backup before upgrade!
  • Use Putty to SSH and upgrade.

Lets get started 

1. Lets make sure we have all the installed packages up to the latest date by running the following commands.

sudo apt update

2. Now run the following to upgrade the installed packages.

sudo apt upgrade

3. This following command will upgrade the distribution of the software to the latest release. After its done reboot the server.

sudo apt dist-upgrade

4. We will now install the Update Manager Core. If it tells you, it is already installed you are 1 step ahead.

sudo apt install update-manager-core

5. Alright so now we will have to use the nano command to edit a file.

sudo nano /etc/update-manager/release-upgrades

6. locate the word prompt= if it says anything besides lts make it lts, afterwards save and close by pressing Ctrl+O and then exit the same with Ctrl+X.

7. We can now move forward with upgrading Ubuntu Server 20.04 to Ubuntu Server 22.04. by using the following command.

sudo do-release-upgrade -d

8. You will be prompted to continue to run under SSH press Y and hit Enter to continue.

9. You may be prompted that there are not valid mirror’s found however here just press Y and Enter to continue.

10. After a moment you will be requested to obtain more package downloads just press Y and Enter to continue.

11. You will now be prompted to allow services to be restarted automatically when packages are upgraded, Select <Yes> and continue.

11. Once the installation is finished reboot your server and test all is working correctly. 

I hope this article was helpful, if you have any questions, please feel free to contact me. If you would like to be notified of when I create a new post you can subscribe to my blog alert.

Leave a Comment

Stay Informed

Receive instant notifications when new content is released.