
Ubuntu 22.04 LTS (Jammy Jellyfish) was released on April 21, 2022 and will be supported for five years. It comes with many new packages and various enhancements to major software systems, including the latest versions of OpenSSL, GCC, Python, Ruby, and PHP. This release is based on the Linux 5.15 LTS kernel and adds support for the latest hardware and file systems.
The desktop edition comes with kernel v5.17, GNOME 42, and the latest screenshot and screen recording tools.
This tutorial explains how to upgrade to Ubuntu 22.04 LTS from Ubuntu 20.04 or Ubuntu 21.10.
Prerequisites Upgrade to Ubuntu 22.04
You can upgrade directly to 22.04 from Ubuntu 20.04 or Ubuntu 21.10. If you are using a version earlier than 20.04, you must first upgrade to Ubuntu 20.04 or 21.10.
The upgrade operation must be performed with superuser privileges. You must be logged in as root or as a user with sudo privileges. Also make sure you have a stable internet connection.
Back up your data
First and foremost, make sure to back up your data before starting the upgrade process on your operating system. If you are running Ubuntu in a virtual machine (VirtualBox or VMware), it is best to take a full system snapshot so that you can easily restore your machine if the upgrade fails.
Update packages that have currently been installed
Before starting a version upgrade, it is recommended that you update all your installed packages to their latest versions.
Packages marked ” restrained ” cannot be automatically installed, upgraded or removed. This can cause problems during the upgrade process. To check if any packages are “blocked” on your system, run:
sudo apt-mark showhold
If a packet has the status on hold
you need to run the command unhold
with the command:
sudo apt-mark unhold package_name
Next step, refresh the apt list and upgrade all installed packages:
sudo apt update && sudo apt upgrade
If the kernel is undergoing an upgrade process, reboot the machine to apply the changes and minimize errors:
sudo systemctl reboot
Upgrade the major version of the installed package:
sudo apt full upgrade
Remove any auto-installed dependencies that are no longer needed by any package:
sudo apt --purge autoremove
Upgrade to Ubuntu 22.04 LTS (Jammy Jellyfish)
Upgrading to the latest version of Ubuntu is a very simple process. You can upgrade from the command line with commands do-release-upgrade
or using the GUI update tool.
We will perform the update from the command line, which should also work for Desktop and Server systems.
do-release-upgrade is part of the ” update-manager-core ” which is installed by default on most Ubuntu systems. If for some reason it is not installed on your system, install it with the command:
sudo apt install update-manager-core
Start the upgrade process by typing:
sudo do-release-upgrade -d
This command will disable all third party repositories and change the apt list to point to the Jammy repository. You will be asked several times to confirm that you want to proceed with the upgrade. When prompted if you want the service to restart automatically during this type of upgrade, enter it y
confirm.
During the upgrade process, the command will ask you various questions, such as whether you want to keep the existing configuration file or install the maintainer’s version of the package. If you didn’t make any particular changes to the file, type Y
. Otherwise, it is recommended to stick with the current configuration. Read the questions carefully before making a choice.
The upgrade process runs in the GNU screen session and will automatically reconnect if the connection suddenly drops.
Once the new packages are installed, the update tool will ask you if you want to remove the outdated software. If you are not sure, type it d
and see the list of obsolete packages. It is generally safe to type y
and remove all obsolete packages.
Once the upgrade process is complete, and assuming everything went well, you will be prompted to restart your machine. Type y
continue:
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
Confirm Upgrade
Wait a few moments for the system to boot up and connect to your system. If you are a desktop user, you will be greeted with a new graphical startup and login screen.
You can also check the Ubuntu version by entering the following command:
lsb_release -a
No LSB modules are available. Distributor ID: Ubuntu Description:Ubuntu 22.04 LTS Release: 22.04 Codename: jammy
At this point the upgrade to Ubuntu 22.04 has been successful and enjoy your new Ubuntu 22.04 installation.
Conclusion
Upgrading to Ubuntu 22.04 LTS is a relatively easy task. If you encounter any errors, visit the release notes page, which covers known issues that may have occurred during the upgrade process.
If you want the update process to be faster in the future, you can add a local repository to your Ubuntu 22.04 system. Please see our article on the Ubuntu 22.04 local repository page