Not so long ago Ubuntu 22.04 was released. It is a long awaited LTS release with a long support period, so if you have been using an older version of 21.10 or even a past LTS release, it may be time to upgrade your system. If you want to upgrade from 21.04, you should first upgrade to 21.10. If you can, it is better to reinstall the system completely. If you don't want to lose installed programs, you can try to upgrade Ubuntu to 22.04. The instructions will tell you how to do it correctly.
To minimize the differences between the state of the packages of your system and the one that the developers prepared before the upgrade you should update it to the latest state. To do this, first update the package lists:
$ sudo apt update
Next, update the entire distribution with permission to remove conflicting packages:
$ sudo apt dist-upgrade
Next, you can remove packages that are no longer needed on the system:
$ sudo apt autoremove
You may need to reboot the system after the update:
$ sudo reboot
To run the update in the GUI, run the command:
$ sudo do-release-upgrade -f DistUpgradeViewGtk3
Or:
$ update-manager -d
Here you need to click the Update button.
In the next window, you can read the release information to which your system will be updated. Here too, you need to click on the Update button:
Once the update search is complete, the utility will inform you that a new release of Ubuntu 22.04 is available. Next, the installer will download the updater and all the necessary packages:
The download will take a little time:
The final step, when you can still change your mind about updating your system. The installer displays a summary of the future upgrade, how many packages to download, how many to remove, how long it will take. Once all the necessary packages have been downloaded, you cannot cancel the upgrade:
Immediately after starting the update, the system will inform you that the screen lock is disabled until the update is complete:
This will start the process of downloading the packages, which can take anywhere from ten minutes to several hours, depending on your connection speed:
During the upgrade process, you will need to select a way to switch the layout:
Since Firefox is now distributed as a snap package the installer will warn you about this in a separate window. It is recommended to close all open Firefox windows before clicking Next.
Wait until Ubuntu upgrade to 22.04 is complete and all packages are installed:
After that, the update installer will prompt you to clean the system of packages that are no longer needed. Close all running applications except the installer and click Next:
The system update is over. The only thing left to do is to restart your computer.
That's it. You know how to upgrade to Ubuntu 22.04. After rebooting, you can check that the upgrade was successful. To do this, open the Settings utility, then go to About System. Here the distribution version is displayed:
You can also run the command in the terminal:
$ sudo cat /etc/lsb_release
The steps to update Ubuntu in the terminal will be the same as when working in the GUI. Only in the second step, you need to run the command to start the update manager:
$ sudo do-release-upgrade
After that, you have to follow the instructions in the terminal.