How to upgrade from Ubuntu 18.04 LTS to 20.04 LTS today

This article is more than 4 years old.


Ubuntu 20.04 LTS (Focal Fossa) was officially released on April 23. This is the latest Ubuntu Long Term Support (LTS) release, with security patches and updates available until 2025. If you are currently using an older version of Ubuntu, you may be interested in upgrading.

In this tutorial, we will show how to safely upgrade from Ubuntu 18.04 LTS (Bionic Beaver), the previous LTS, to the current one. We will explain several methods by which you can achieve this, including some advanced tips and tricks that can help you further customise your upgrade process.

Before you upgrade…

There are several things you need to take into account before you go forward with the upgrade:

  • The upgrade process can be done using the Ubuntu update manager or on the command line. The Ubuntu update manager will start showing a prompt for an upgrade to 20.04 once the first dot release of Ubuntu 20.04 LTS (i.e. 20.04.1) is released. The typical timeframe for this is around three months after the official release.

    Once this functionality is enabled, you will see a prompt like this one:

You can still do an upgrade right now, though. However, the process at the moment involves some use of the command line, and therefore requires some level of technical knowledge and confidence. If you are not sure about any of the steps or methods outlined below, you might want to wait for the dot release.

  • If you do want to proceed with the upgrade, you can launch the graphical guided wizard from the command line, or complete the entire process using the latter. In this tutorial, we will demonstrate both options.
  • Please make sure to back up your data. Upgrades are normally safe, but there is always a chance something may go wrong. It is crucial that you have your personal files safely copied to a backup location, so you can restore them if there are any problems or complications. There are several ways you can do this:
    • Ubuntu has its own backup tool, which you can turn on.
    • You can also manually copy important files to a different device (second hard disk, USB drive, another computer on the network, etc). You can copy the files manually or use a data backup/replication tool. Good examples for simple, friendly tools of this nature are Timeshift and Grsync. On the command-line, you can use tar or rsync.
Ubuntu backup tool interface.
  • You can also create a full system image of your Ubuntu installation with a dedicated system imaging software like CloneZilla.
  • If you want to double-check everything works well on your hardware, you can download the Ubuntu 20.04 LTS ISO image, copy it to a USB drive using a live media creation tool like Ubootnetin, and then start your computer in an Ubuntu 20.04 LTS live session.
  • Please make sure your computer has sufficient free disk space. By default, for the best experience, you should have 25 GB of free space for a new installation of Ubuntu. With version upgrades, you can get by with less free disk space, but the process could take longer.
  • The upgrade process can take some time. You should not interrupt or cancel the process, as it may leave the system in an unstable state. If you are using a battery-powered device, like a laptop, it is advisable to use the charger.

Upgrade to 20.04 LTS – using a graphical guided wizard

As we mentioned earlier, the Ubuntu update manager will start showing upgrade notifications to users roughly three months after the official release. However, it is possible to upgrade Ubuntu 18.04 LTS without having to wait.

This entails running a command in a terminal window, which will then launch the graphical guided wizard.

If you are not comfortable with this path, it is best to continue running Ubuntu 18.04 LTS until the availability of the upgrade offer through the update manager. The sequence of actions below requires some familiarity with the command-line usage, so it’s best suited for people like developers, administrators or more skilled techies.

The command to start is do-release-upgrade, executed with specific options.

To better understand what we are going to do, you can check what options are available in the do-release-update tool by running the command with the -h flag:

sudo do-release-upgrade -h
Usage: do-release-upgrade [options]
Options:
-h, --help    show this help message and exit
-V, --version Show version and exit
  -d, --devel-release
                If using the latest supported release, upgrade to
                the development release
  --data-dir=DATA_DIR
Directory that contains the data files
  -p, --proposed       
Try upgrading to the latest release using the
                upgrader from $distro-proposed
  -m MODE, --mode=MODE
                Run in a special upgrade mode. Currently
                'desktop' for regular upgrades of a desktop
                system and 'server' for server systems are
                supported.
  -f FRONTEND, --frontend=FRONTEND
                Run the specified frontend
  -c, --check-dist-upgrade-only
                Check only if a new distribution release is
                available and report the result via the exit code
  --allow-third-party Try the upgrade with third party mirrors and
                repositories enabled instead of commenting them
                out.
  -q, --quiet

Specifically, the important options are:

  • -d – this allows us to upgrade to 20.04; normally, this option is used by early testers to try development versions of Ubuntu ahead of their official release. We will use it to start the upgrade. While the labels say “development”, don’t worry – we will in fact be upgrading to the stable, official release of Ubuntu 20.04 LTS.
  • -f – this option will launch a graphical guided wizard. Without it, the do-release-upgrade tool will run in the command-line. The process is otherwise identical.

Another useful option is –allow-third-party. We will talk about it a bit more in the section titled ‘Advanced options & third-party software’. If your Ubuntu setup includes applications from sources other than the standard Ubuntu repository archives, you may want to include this option to preserve and carry over your third-party applications.

Therefore, to start the upgrade to Ubuntu 20.04 LTS using a GUI tool, the full command we need is then:

sudo do-release-upgrade -d -f DistUpgradeViewGtk3

This will launch the upgrade process using a Gtk3-based GUI.

You can safely ignore the text that says development. The prompt will change with the availability of the 20.04.1 release.

The wizard will ask you several questions, and run through several steps:

You will first be asked to confirm the upgrade.
The upgrade wizard will notify you that the lock screen will be disabled during the process.
The tool will then download the necessary system files and applications for the upgrade. The process can take some time, so please be patient.

You may be asked one or two questions during the upgrade, specifically if you want to retain existing settings for certain system files (like timezone configuration). If you are not sure, you can safely proceed with the default answer.

 After a while, the upgrade should complete, and you should see yourself logged into the 20.04 desktop!

Advanced options & third-party software

For most users, the flow described above will be sufficient. However, you can further customise it, which is particularly useful for those using third-party software that is installed from software channels outside the standard Ubuntu archives. For instance, if you’ve installed the Google Chrome, Skype or VirtualBox software manually, the updates for these applications are provided through separate repositories.

By default, non-Ubuntu software channels will be disabled during the upgrade. You will need to manually enable them after the upgrade is completely. Alternatively, you can instruct the upgrade tool to allow these additional packages.

This can be done by running do-release-upgrade with the –allow-third-party flag, as mentioned earlier.

Alternative options to upgrade

You can start the graphical guided wizard upgrade process in several other ways.

On the command line, you can run update-manager -c to initiate the upgrade. Like the do-release-update tool, you can run the above with the optional -d flag to get the “development” release ahead of the 20.04.1 availability.

sudo update-manager -c
sudo update-manager -c -d

On the command line, you can also run /usr/lib/ubuntu-release-upgrader/check-new-release-gtk.

sudo /usr/lib/ubuntu-release-upgrader/check-new-release-gtk

In general, you can control what Ubuntu release upgrades are available, regardless of which tool you use and run. This can be done by editing the following configuration file:

/etc/update-manager/release-upgrades

Here, you can check the line Prompt=XXXX, whereby:

  • never – no upgrades will be offered.
  • normal – supported release that immediately succeeds the currently running release will be offered.
  • lts – LTS releases will be offered.

Upgrade to 20.04 LTS – on the command line

The upgrade process on the command-line is very similar to what we have already done. The only difference is no GUI will be launched and you will be asked Y/N questions in the terminal window.

sudo do-release-upgrade -d
The sequence of steps shown here is identical to the work we’ve done earlier with the graphical guided wizard. The first step is to confirm that you want to proceed.
The image above shows the scrolling text of the ongoing upgrade process.
Various system packages have been downloaded, and are being unpacked and copied over the older versions as part of the upgrade process.
The cleanup step removes the packages that are no longer required (or relevant) in the new version of Ubuntu. This will also free space on your hard disk.

Once complete, you will be logged into the 20.04 desktop:

Summary

In this guide, we laid out several methods for upgrading from Ubuntu 18.04 LTS to 20.04 LTS. These include both visual tools, i.e. graphical wizards, and command-line utilities, which are often best suited for more skilled users. The Ubuntu update manager will start prompting users in about three months, but if you want to upgrade your system now, we also outlined the steps you will need to get underway.

If you are still undecided about the upgrade, and would like to learn more, you may want to sign up for a webinar highlighting the new features and technologies available in Ubuntu 20.04.

We hope you will find this tutorial valuable and useful, and we hope you enjoy your new desktop experience.

Time to prepare for Ubuntu 18.04 LTS End of Standard Support

Bionic Beaver will reach the end of the standard, five-year maintenance window for Long-Term Support (LTS) releases on 31 May 2023. Migrate to the latest LTS or get extended coverage until 2028 with Ubuntu Pro.

Learn more ›

Newsletter signup

Get the latest Ubuntu news and updates in your inbox.

By submitting this form, I confirm that I have read and agree to Canonical's Privacy Policy.

Related posts

Canonical offers 12 year LTS for any open source Docker image

‘Everything LTS’  – Canonical will build distroless Docker images to customer spec that include upstream components not packaged in Ubuntu, and fix critical...

Canonical announces public beta of optimized Ubuntu image for Qualcomm IoT platforms

Today Canonical, the publisher of Ubuntu, and Qualcomm® Technologies announce the official beta launch of the very first optimized image of  Ubuntu for...

Entra ID authentication on Ubuntu at scale with Landscape

Authd allows Entra ID authentication on both Ubuntu Desktop and Server. Learn how to configure Authd at scale using Landscape and Cloud-init