The Ubuntu 22.04, codenamed “Jammy Jellyfish”, is the latest LTS release of the Ubuntu operating system. It was officially released on April 21, 2022. It ships with kernel v5.15 and other major upgrades, such as PHP 8.1, Ruby 3.0, OpenSSL 3.0, Golang 1.18, and GNOME 42. With GNOME 42, it has improved usability, battery life, and system performance. GNOME 42 also adds new power profile options and significant optimizations that can double the desktop frame rate on Intel and Raspberry Pi graphics drivers. Ubuntu 22.04 LTS is the first LTS release that supports all the recent Raspberry Pi devices, from the new Raspberry Pi Zero 2W to the Raspberry Pi 4.
This tutorial will demonstrate how to upgrade from Ubuntu 20.04 LTS (Focal Fossa) to Ubuntu 22.04 LTS (Jammy Jellyfish).
Before proceeding with the installation, make sure you have:
- An Ubuntu 20.04 system with access to sudo privileges
- A reliable internet connection that can download around 2 GB. Depending on your internet speed, it may take less or more than 1 hour to finish the upgrade.
You can check the version of your Ubuntu system using the following command.
Backup your Ubuntu 20.04 System
Sometimes, upgrading a system can lead to data loss if anything goes wrong while upgrading. It is always recommended to create a backup of the filesystem and important data before a system upgrade. If you are running Ubuntu on the virtual machine, you can take a snapshot of your whole system. If the upgrade goes wrong, you can easily restore your system from a snapshot.
There are various ways to upgrade the system, but we will show you the simplest method in this article. Following are the required steps to successfully upgrade your Ubuntu 20.02 to Ubuntu 22.04.
1. Update the system
The first step is to make sure your Ubuntu system is up to date for the current release. Before performing any installation or upgrade, it is best to update the list of current packages and their dependencies to the latest version.
Run this command to update your list of current packages.
sudo apt update
Then you have to upgrade all the installed packages to the latest versions with this command.
sudo apt upgrade
It displays the packages that will be upgraded and the disk space that will be used. You will be prompted for Y/n input. Type
y and press enter to continue.
It may take some time depending on your upgrade size and connection. Once the upgrade is completed, run the
dist-upgrade command for performing the additional function of the upgrade. It handles changing dependencies with new versions of packages.
sudo apt dist-upgrade
Next, remove the no-longer required packages from your system.
sudo apt autoremove
y and press Enter when prompted to continue.
Now, you have to reboot your system before doing the system upgrade.
2. Upgrade Ubuntu 20.04 LTS To Ubuntu 22.04 LTS
do-release-upgrade is the command-line utility for upgrading Ubuntu to the latest version available. It is a single but powerful command that makes the upgrade process easier and safer.
When the system boots up, open the terminal and run this command to upgrade to Ubuntu 22.04.
It will search for the newer version of Ubuntu. If it finds a new release, the upgrade process will start automatically. The latest LTS version is not immediately available for the
do-release-upgrade command before its first point release (22.04.1). If that’s the case, you might see no LTS release available.
You can use the
-d option to upgrade to the latest development release.
sudo do-release-upgrade -d
Then it proceeds to check the package manager and update the repository information.
Before starting the upgrade, it will calculate some changes and display the following information.
- The number of installed packages that are no longer supported by Canonical.
- The number of obsolete packages is going to be removed.
- The number of new packages that are going to be installed.
- The number of packages that are going to be upgraded.
- The total size of all the packages and the estimated time taken to download with your connection.
y and press Enter to continue the upgrade.
You will see multiple questions in the dialog box during the process. For instance, you will be asked whether you want to restart services automatically during package upgrades. In such cases, it is safe to hit
Yes. It will automatically restart the necessary services so you can avoid being prompted on each upgrade.
Moving on, you will see the configuring firefox dialog box. Starting in Ubuntu 22.04, Firefox is made available to Ubuntu users through the snap package only. The Firefox package update will transition to your system to the snap by installing it. If you have any firefox windows open, close them and enter OK to upgrade to the firefox snap.
Similarly, you may be presented with other dialog boxes, like configuring postgresql. In such cases, select OK to continue the upgrade process. It will install the latest versions of the packages.
After finishing the installation of new packages, it will ask you whether you want to remove obsolete packages. It is generally safe to enter
y to remove obsolete packages. If you want to check the list of packages before deleting them, enter
Once the upgrade is completed, you will be prompted to restart your system. Press
y and hit enter to reboot the system.
System upgrade is complete. Restart required To finish the upgrade, a restart is required. If you select 'y' the system will be restarted. Continue [yN]y
When the system boots up, you can verify the upgrade by checking the Ubuntu version.
As you can see, we have successfully upgraded to the latest release Ubuntu 22.04 LTS.
Upgrading to the latest version of Ubuntu is an easy and smooth process. We hope this tutorial helps you upgrade your Ubuntu 20.04 to Ubuntu 22.04. This release will be supported for the next 5 years until 2027. Now you should be able to enjoy the latest features and updates on the Ubuntu 22.04 LTS. If you have any questions, feel free to ask us in the comment section below.