Upgrading Ubuntu 20.04 to 21.04
We can upgrade our system using commands, you need to simply follow the following procedure.
First of all, update package information.
$ sudo apt update
Then,
$ sudo apt dist-upgrade
After running the above command if you see the new kernel being installed then your system needs to be rebooted before continuing to upgrade. To reboot run:
$ sudo shutdown -r now
After the reboot completes, we need to make some changes in the update manager config file. To do so open the following config file in your preferred editor, I am using vim.
$ sudo vim /etc/update-manager/release-upgrades
At the bottom of the file, you will see the Prompt change its value from LTS to normal. After changes are made simply write and quit the file.
Now, if your Ubuntu current build is 20.04, you need to first upgrade to Ubuntu 20.10 following the same process then, lastly upgrade to Ubuntu 21.04 from Ubuntu 20.10. After everything is set up, execute the following command to proceed with the upgrade.
$ do-release-upgrade
After running the above command, it will do some process then you will be prompted with the following question. To start the upgrade type y and hit enter then you will be notified that your screen lock will remain disabled during the upgrade process, to continue again hit enter.
Depending on your network it will take time to download all the packages. Once downloaded completely you will see the following configuration prompt then select ok and hit enter.
Then, again you will see another prompt dialog asking you to choose whether to continue with the configuration or not. For me, I would prefer to go with config so I select yes and hit enter.
Once installation completes you will be asked if you want to remove obsolete packages, I will go with yes so I type y and hit enter. Obsolete packages refer to unused packages or packages that were no longer in development or in use.
Now, once everything is set up you will be asked to reboot your system in order to do so type y and hit enter. After reboot is completed you can test your Ubuntu version using the following command.
$ lsb_release -a
The Ubuntu upgrade from 20.04 to 21.04 has been completed successfully.