How To

Upgrade to Ubuntu 20.04 LTS: Prepare, Update, and Confirm

Ubuntu 20.04 LTS (code name Focal Fossa) was released on April 23, 2020. It is a long-term support release, which means it receives security and maintenance updates for five years.

This release includes:

  • Linux 5.4 LTS kernel with support for new hardware and file systems
  • GNOME 3.36 desktop with a new default theme called Yaru
  • Updated versions of Python, PHP, Ruby, GCC, and OpenJDK

This guide walks you through how to upgrade to Ubuntu 20.04 from Ubuntu 18.04 or Ubuntu 19.10. If you are running an earlier version, you need to upgrade to one of those first before jumping to 20.04.

<strong>Prerequisite:</strong>&nbsp;You need root access or a user account with sudo privileges to perform this upgrade.

Back Up Your Data First

Before you do anything, back up your important files. A major OS upgrade carries a small risk of failure, and you want your data to be safe if something goes wrong.

If your system is a virtual machine, take a full snapshot before you start. This gives you a quick restore point in case the upgrade fails or breaks something.

Update All Installed Packages

You need to update all currently installed packages before starting the release upgrade. Running it with outdated packages can cause conflicts or errors mid-upgrade.

First, check if any packages are being held back:

bashsudo apt-mark showhold

If any are on hold, release them before proceeding:

bashsudo apt-mark unhold package_name

Update your package list and upgrade all installed packages:

bashsudo apt updatesudo apt upgrade

If the kernel was upgraded, reboot your machine and log back in:

bashsudo systemctl reboot

Then run a full upgrade to handle any packages that require dependency changes:

bashsudo apt full-upgrade

Then clean up packages that are no longer needed:

bashsudo apt --purge autoremove

Your system is now fully up to date and ready for the release upgrade.

Upgrade to Ubuntu 20.04 LTS

The upgrade uses a tool called do-release-upgrade. It is part of the update-manager-core package, which is installed by default on most Ubuntu systems. If it is not on your system, install it with:

bashsudo apt install update-manager-core

Start the upgrade:

bashsudo do-release-upgrade -d

Here is what happens during the process:

  • The tool disables all third-party repositories and points apt to the Ubuntu 20.04 (focal) package sources
  • You will be asked several times to confirm you want to continue. Read each prompt carefully before pressing y
  • When asked whether services should be restarted automatically during the upgrade, type y
  • If asked whether to keep an existing config file or install the package maintainer’s version, keep your current file unless you have not made any custom changes to it
  • The upgrade runs inside a GNU screen session. If your connection drops, it will automatically re-attach when you reconnect

The whole process can take anywhere from 20 minutes to over an hour, depending on your internet speed and the number of packages being updated.

When it finishes, the tool asks if you want to remove obsolete packages. If you are not sure, type d to view the list first. It is generally safe to type y and remove them.

The tool will then ask you to reboot. Type y to restart.

Confirm the Upgrade

After your system restarts and you log back in, confirm that Ubuntu 20.04 is running:

bashlsb_release -a

Output:

Distributor ID: UbuntuDescription:    Ubuntu 20.04 LTSRelease:        20.04Codename:       focal

Your system is now running Ubuntu 20.04 LTS. If you run into any issues, check the Ubuntu 20.04 release notes for a list of known problems and their fixes. Got questions? Leave a comment below.

Cyber Defence

Recent Posts

Install Google Chrome on Ubuntu 20.04: Download and Setup Guide

Google Chrome is the most widely used web browser in the world. It is fast, secure,…

20 minutes ago

Install Java on Ubuntu 20.04: OpenJDK 11, JDK 8, and JAVA_HOME

Java is one of the most widely used programming languages in the world. It runs on…

26 minutes ago

Install Ubuntu on Raspberry Pi: Flash, Configure, and Boot

Raspberry Pi is the most popular single-board computer ever made. It is small, affordable, and surprisingly…

31 minutes ago

Install pip on Ubuntu 20.04: Python 3, Python 2, and Usage Guide

pip is Python's package manager. It lets you search, download, and install packages from the Python Package…

39 minutes ago

Install MySQL on Ubuntu 20.04: Setup, Security, and Root Access

MySQL is the most popular open-source relational database management system. It is fast, reliable, and a…

24 hours ago

Install Git on Ubuntu 20.04: Apt, Source, and Configuration

Git is the most widely used version control system in the world. It was created by…

1 day ago