Ubuntu 22.04 LTS (Jammy Jellyfish) is the latest version of Ubuntu released on April 21, 2022, with five years of support (until April 2027). This release is based on the Linux 5.15 LTS kernel and adds support for new hardware and file systems. In this article, we’ll show you how to upgrade from Ubuntu 20.04 or Ubuntu 21.10 to Ubuntu 22.04 LTS.
Note. We strongly recommend that you perform a full backup of your data before upgrading the operating system.
Check the currently installed version of Ubuntu:
The host has Ubuntu 20.04.4 LTS installed.
Before you start upgrading your Ubuntu version, you need to update the installed packages:
- First check if there are any packages in the system that are not allowed to be upgraded (fixed versions):
sudo apt-mark showhold
- If the apt-mark command returns a list of on-hold packages, you need to unhold each of them:
sudo apt-mark unhold package_name
- Now update the packages installed on the system:
sudo apt update && sudo apt upgrade
- Update your distribution completely and remove conflicting packages:
sudo apt full-upgrade
- Remove unused packages:
sudo apt autoremove
- Reboot the system:
To run an Ubuntu upgrade through the graphical package manager, run the command:
If the update manager does not open, check that it is installed:
sudo apt install update-manager-core -y
Hint. In previous versions of Ubuntu, the list of repositories in /etc/apt/sources.list was used to update the system via apt. To perform the upgrade, you just need to run the apt-get dist-upgrade command. In modern versions of Ubuntu, you can use the do-release-upgrade command, which makes upgrading safer and easier.
To run an Ubuntu update from the terminal, run the command:
sudo do-release-upgrade -d
This command will replace the “focal” system repositories with the “jammy” repositories. All third-party PPA repositories will be disabled. Additionally, another sshd daemon is launched on port 1022, which can be used to connect if your session is interrupted (don’t forget to temporarily open the port in the firewall: iptables -I INPUT -p tcp –dport 1022 -j ACCEPT).
When updating, you will need to periodically confirm the actions in the console.
After the update is completed, the following message will appear:
System upgrade is complete.
To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.
Continue [yN] y
Reboot the host and make sure the Ubuntu version has been updated to 22.04:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS