Upgrading the Ubuntu to its latest version is a straightforward and essential process. There are two methods of Ubuntu up-gradation.
You can do it by the GUI update tool and by command line. This article will tell you the complete command-line process on servers and desktops.
By following this article, you can easily upgrade to the latest version, Ubuntu 22.04, from Ubuntu 20.04 or 21.10.
- The upgrade operation can be done with the superuser (root) folder. You must be logged in as a user with sudo privileges or a root user.
- When Ubuntu is installed the first time, that user is superuser privileges by default. Before starting work, make sure you have a good internet connection.
- The foremost thing is to make sure to take a backup of your data before making any changes.
Update Package Currently
Before starting the release upgrade, Update all your packages to the latest version. Packages marked as held cannot be installed, upgraded, or removed automatically. So you need to upgrade them manually.
To check about held packages in your system, use this command:
sudo apt-mark showhold
If you got an empty output, there are no held back packages, but if some packages are
on hold, you need to unhold the boxes.
An empty output means there are no held back packages. If there are on hold packages, you should unhold the packages with:
sudo apt-mark unhold package_name
Then refresh the
apt list and upgrade installed packages by these commands:
sudo apt update
sudo apt upgrade
Perform a system upgrade by this command:
sudo apt full-upgrade
Remove all automatically installed old kernels:
sudo apt --purge autoremove
Upgrade to Ubuntu 22.04 LTS (Jammy Jellyfish)
You can upgrade your Ubuntu to the latest version with a single line of command:
do-release-upgrade command will disable all present third-party repositories, change your apt list, and point them to “jammy.”
During this process, you get prompt to confirm whether you want to start. You need to click on
Y every time until you want to do some custom changes.
According to your internet connection, it may take some time.
Then you’ll ask to reboot your machine, click
yes , and get this output.
"System upgrade is complete.
To finish the upgrade, a restart is required.
If you select 'y', the system will be restarted.
Continue [yN] y"
Your Ubuntu new version is installed. Now to check, run this command:
If you get this output
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
On account of the huge popularity of Ubuntu among the Linux desktop users, we are pleased to share this article on how to upgrade to Ubuntu 22.04.
We have tried our best to simplify the process so that anyone can upgrade to Ubuntu 22.04 easily and smoothly.
If you get a problem, go to the release notes page to see if there are any known issues that might occur during the upgrading.