This post shows students and new users the steps to upgrade Ubuntu Desktop or Server from a previous version. If you have a decent internet connection, the process for upgrading to the next version of Ubuntu is pretty straightforward.
Ubuntu Linux comes with two types of support: long-term support (LTS) and short-term support (STS). Ubuntu LTS versions are typically supported for five (5) years, while STS versions are supported for approximately 9 months.
Ubuntu LTS versions will normally see update notifications when new versions are available. STS versions will also see update notifications for the latest STS versions. Upgrading from one version to the next is fairly straightforward. However, if you have an LTS release version and you want to upgrade to an STS version, you will have a bit of work to do.
If your version of Ubuntu is two versions older, you will need to update to the next version online before you can update to the latest or most current version.
To start updating Ubuntu Linux, follow the steps below.
How to update Ubuntu packages
Before starting the version update, it is recommended to update all currently installed packages to their latest versions.
If you have packages installed on Ubuntu and they are marked as detained, those cannot be installed, updated or removed automatically. This can cause problems during the update process.
To check if there are packages being held on your systems, run the following commands.
sudo apt-mark showhold
If there are packets on hold, run the following commands to release the hold.
sudo apt-mark unhold package_name
Replace package_name with the name of the package that is being kept from updates or enhancements.
After that, run the following commands to update and update all installed packages.
sudo apt update sudo apt upgrade
In some cases, you may need to reboot before continuing with the version update.
Then run the following commands to perform a major update or installed packages.
sudo apt full-upgrade
Then run the following commands to automatically remove dependencies for installed packages that are no longer needed in Ubuntu.
sudo apt --purge autoremove
After you have done the steps above, proceed below with the update.
How to perform a release update on Ubuntu Linux
Now that the current version of Ubuntu is up to date, proceed below with the release update. As mentioned above, the update process is pretty straightforward.
You can update from the command line with make-release-update or using the desktop GUI update tool called Software Updater. The command line option works for both desktop and server editions of Ubuntu.
First, make sure the update package is installed. Run the following commands if it is not already installed.
sudo apt install update-manager-core
After installing the above package, run the following commands to start the update process.
sudo do-release-upgrade -d
The above command will disable all third-party repositories and change the eligible list to point to the Ubuntu update version repositories. You will also be asked several times to confirm that you want to continue with the update.
Follow the instructions on the screen. and = yes and North= No. When asked if you want to update the type and.
Do you want to start the upgrade? 5 packages are going to be removed. 85 new packages are going to be installed. 1168 packages are going to be upgraded. You have to download a total of 803 M. This download will take about 11 minutes with your connection. Installing the upgrade can take several hours. Once the download has finished, the process cannot be canceled. Continue [yN] Details [d]
Wait for all the newer packages to download. This may take a while depending on the speed of your internet connection. Once all the packages have been downloaded, your system will start updating immediately.
After the new packages are installed, the update tool will ask if you want to remove the outdated software. If you have a system that you customized, you may want to enter D to see the list, in case you need to reinstall.
Remove obsolete packages? 53 packages are going to be removed. Continue [yN] Details [d]y
When asked if you want the services to restart automatically during the type of update and by Yes.
When the update process is complete, assuming everything went well, you will be prompted to reboot. Writes and to restart your computer to finish configuring your system.
Restart required To finish the upgrade, a restart is required. If you select 'y' the system will be restarted. Continue [yN] y
Once your system restarts, your Ubuntu system has been fully upgraded to the next release version. You can run the following commands to check the current version.
That should generate lines similar to the ones shown below:
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 21.04 Release: 21.04 Codename: hirsute
In this tutorial we have seen how to update Ubuntu Linux. As you can see above, the steps are relatively painless and straightforward. If you find any errors above or have something to add, please use the comment form below.