Upgrade Ubuntu 18.04 to Ubuntu 20.04

|
Last Updated:
|
|

Well, Ubuntu 20.04, codenamed Focal Fossa is now available for testing with official version being likely to be released on April 2020, based on the Ubuntu release cycles trend. As such, let us see how to Upgrade Ubuntu 18.04 to Ubuntu 20.04.

Upgrading Ubuntu 18.04 to Ubuntu 20.04

Disclaimer: Note that this guide is meant for testing purposes and not production environments and hence we cannot be held liable for whatever damage the processes described here may cause to your system.

Before you run system upgrade to the next major release version, ensure that you take a backup of the current system to enable you to revert back just in case things go south. The backup processes is beyond the scope of this guide.

Run system Update

Begin by updating and upgrading your Ubuntu 18.04 system packages to their latest versions.

sudo apt update
sudo apt upgrade

You can as well run system full upgrade.

sudo apt full-upgrade

According to man 8 apt, full-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole.

Remove the packages that are no longer required.

sudo apt autoremove

Reboot the system once the upgrade completes.

sudo systemctl reboot

Upgrading Ubuntu 18.04 to Ubuntu 20.04

Ubuntu ships with a command utility called, do-release-upgrade, which is used upgrade Ubuntu operating system to latest release. This utility is installed by default. If not installed, for some reasons, you can simply install update-manager-core which provides it by running;

sudo apt install update-manager-core

You can then run system upgrade to the new release version by simply executing;

do-release-upgrade

This utility supports a number of command line options. Check, do-release-upgrade -h. For example, if you are on Ubuntu 18.04 desktop versions, you can run desktop upgrade to the new release by executing;

sudo do-release-upgrade -m desktop

To run regular upgrades for the server versions;

sudo do-release-upgrade -m server

The do-release-upgrade command usually works only after the release of first point release of a major LTS release. For this case, this command will only work after the availability of Ubuntu 20.04.1.

Well, if you get the output, There is no development version of an LTS available, then it is because Ubuntu 20.04.1 is not available yet.

As such, since we are dealing with the test releases, you can simply upgrade your Ubuntu 18.04 system to the development release version of Ubuntu 20.04. Pass the -d or --devel-release option to do-release-upgrade command.

sudo do-release-upgrade -m desktop -d

The system upgrade to the development release of Ubuntu 20.04 will start immediately you type the command above and press ENTER.


Checking for a new Ubuntu release
Get:1 Upgrade tool signature [1,554 B]                                         
Get:2 Upgrade tool [1,335 kB]                                                  
Fetched 1,337 kB in 0s (0 B/s)                                                 
authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg' 
extracting 'focal.tar.gz'

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Hit http://ke.archive.ubuntu.com/ubuntu bionic InRelease                       
Hit http://ke.archive.ubuntu.com/ubuntu bionic-updates InRelease               
Hit http://ke.archive.ubuntu.com/ubuntu bionic-backports InRelease             
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]    
Fetched 88.7 kB in 0s (0 B/s)                                                  
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Checking for installed snaps
...

Answer through the questions that comes up during the upgrade process.


...
Do you want to start the upgrade? 


36 installed packages are no longer supported by Canonical. You can 
still get support from the community. 

13 packages are going to be removed. 246 new packages are going to be 
installed. 1256 packages are going to be upgraded. 

You have to download a total of 810 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] y

Accept the upgrade and press ENTER to continue.

During the upgrade, you will notice the changes, for example the background on the desktop versions.

When prompted to remove obsolete packages, accept and press ENTER to proceed.

...
Searching for obsolete software
Reading state information... Done

Remove obsolete packages? 


86 packages are going to be removed. 

 Continue [yN]  Details [d]y

When system upgrade is complete, reboot your system.

...
System upgrade is complete.

Restart required 

To finish the upgrade, a restart is required. 
If you select 'y' the system will be restarted. 

Continue [yN] y

You have successfully upgraded your Ubuntu 18.04 system to Ubuntu 20.04.

ubuntu 20.04 1

Ubuntu Focal Fossa system information;

neof

Stay tuned to the official release of Ubuntu 20.04 for your official upgrades.

Other Tutorials;

Install Ubuntu 20.04 on VirtualBox

Install and Setup ZSH and Oh-My-Zsh on Ubuntu 20.04

Install VirtualBox Guest Additions on Ubuntu 20.04

Use VirtualBox VMs on KVM

Install VirtualBox Guest Additions on CentOS 8

Install CentOS 8 on VirtualBox

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
koromicha
I am the Co-founder of Kifarunix.com, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others".

3 thoughts on “Upgrade Ubuntu 18.04 to Ubuntu 20.04”

  1. Hi, I am on 19.10 version, When 20.x releases will I be able to upgrde directly or i will need to downgrade to 18.x ?S

    Reply
  2. You’re the first post / tutorial I found which properly explained, why I need to use the -d option, even when I am looking for a stable release, not a development release. Thanks you so much.

    Reply

Leave a Comment