In this guide, we will cover how to upgrade Ubuntu 20.04 to 22.04 LTS (Jammy Jellyfish) step-by-step.
Ubuntu 22.04 (Jammy Jellyfish) has officially been released. It’s the latest Ubuntu LTS release and it ships with numerous improvements and new applications such as PHP 8.1, Ruby 3.0, OpenSSL 3.0, Golang 1.18, GNOME 42, and improved support for Raspberry Pi to mention just a few. We already have a guide on how to install Ubuntu 22.04.
In case, you have Ubuntu 20.04 LTS and don’t feel like starting from scratch, you can easily upgrade to Ubuntu 22.04 using a few simple steps.
Upgrade Ubuntu 20.04 to 22.04 LTS
Without any further delay, let deep dive into the actual upgrade process. Before initiating the upgrade, kindly take the backup of all your files using timeshift tool.
Prerequisites
Before you commence the upgrade, ensure that you have the following in place:
- An instance of Ubuntu 20.04 with a sudo user configured
- A high-speed internet connection. In this guide, we are using an internet connection of 15 Mbps.
- At least 10 GB of free disk space is recommended. If you have a separate boot partition, ensure that you have at least 200MB of free space on that partition.
1) Upgrade Ubuntu to the Latest Release
To begin the upgrade process, log in to your Ubuntu 20.04 instance and upgrade all the packages to their latest versions.
$ sudo apt update && sudo apt upgrade -y
This might take a while depending on how many packages have pending upgrades. While the upgrade is in progress. Just sit back and relax and let it continue.
Upon completion, reboot your system.
$ sudo reboot
Login once again and verify that you are running the latest release of Ubuntu 20.04, which should be Ubuntu 20.04.4.
You can verify this using the command:
$ lsb_release -a
2) Begin Upgrade From Ubuntu 20.04 to 22.04
To initiate the actual upgrade, run the following command.
$ sudo do-release-upgrade -d
The command checks for the availability of a new Ubuntu release and proceeds to download the upgrade tool.
The upgrade tool performs a series of operations. It updates the local package index, checks for installed snaps, and determines their size. It then proceeds to update the repository information.
To continue, simply hit ENTER on your keyboard.
Moving on, the upgrade tool will provide you with a summary of the following:
- Packages that are no longer supported by Canonical.
- The number of obsolete packages that will 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 download size of all the packages and the estimated time taken to download them.
To continue, type ‘y’ and hit ENTER.
All the current ‘focal’ sources list files for Ubuntu 20.04 will be overwritten by ‘jammy’ sources list files for Ubuntu 22.04.
There are services installed on your system that will be affected during the upgrade and will certainly need to be restarted. Thankfully, the upgrade tool will automatically restart these services for you since manually restarting them will interrupt the upgrade process.
From here, the upgrade to Ubuntu 22.04 will continue. This takes quite some time as the system downloads new packages and installs them.
Starting from Ubuntu 22.04, Firefox will only be available to Ubuntu users via the snap package. The Firefox upgrade will automatically transition Firefox to snap. If you have an instance of Firefox running, close it and select the ‘OK’ option to transition Firefox to a snap package.
Along the way, you will be prompted to remove or purge old packages which are a by-product of the upgrade process. Press ‘y’ and hit ENTER to continue.
Finally, you will be prompted to reboot your system to complete the upgrade. Simply press ‘y’ and press ENTER to reboot.
The restart will take a bit longer than usual, so just be patient. Finally, the login screen will appear. Click on your username and provide a password to log in.
This ushers you to the Ubuntu 22.04 (Jammy Jellyfish) desktop as shown below.
You can head over to the terminal and verify that the upgrade was successful, once again, checking the version of Ubuntu.
$ lsb_release -a
The output confirms that we have successfully upgraded from Ubuntu 20.04 to Ubuntu 22.04.
Conclusion
And there yo go. We have successfully upgraded Ubuntu 20.04 system to the latest LTS release, Ubuntu 22.04. Enjoy the new features, performance improvements, and security updates that come with the latest iteration of this beloved Linux distribution. As always, stay tuned for future updates and releases from the Ubuntu community, as they continue to shape the landscape of open-source computing.
Yes, it works.
I upgrade from 20.04 to 22.04, the proccess is smooth and it works.
Thank You.
You’re very much welcome TMK. We are glad you successfully upgraded your system to Ubuntu 22.04!
Upgraded from Ubuntu 20.04. This was really helpful thank you!!
Hey Sammy! We are pleased that the upgrade went along smoothly. Keep it Linuxtechi!
after running command
lsb_release -a
I got message on terminal
Please install all available updates for your release before upgrading.
Could you please help me in this.
Thank you.
Hello Hrushikesh, this means that you did not fully upgrade your system or there was something that prevented it. Kindly run
$ sudo apt update && sudo apt upgrade -y
Then proceed from step 2 onwards. There shouldn’t be any issue after that.
What happened to my saved passwords on Firefox?
PS I hate snap!
I followed this instruction smooth upgrade from 20 to 22
though you must also add that after the apt get and apt upgrade you need to run
apt install dist-upgrade
or your it will not continue and will ask you to install updates
This is a great write-up. All the required commands in one place.
Thanks! It saved me hours of searching.
This doesn’t work for me. Here is what I enter and what I get as a result.
larry@larry-MS-7693:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
larry@larry-MS-7693:~$ sudo do-release-upgrade -d
[sudo] password for larry:
Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS development release
set Prompt=normal in /etc/update-manager/release-upgrades.
*****Nothing happens so I enter the command without the hyphen d.
larry@larry-MS-7693:~$ sudo do-release-upgrade
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
*****Yes! I previously installed all available updates. Why doesn’t it upgrade to OS to 22.04 LTS?