Ubuntu 20.04 Focal Fossa was released on April 23, 2020. This tutorial is going to show you 2 ways to upgrade from Ubuntu 19.10 to Ubuntu 20.04: using the graphical update manager and using the command line. Normally you use the graphical update manager to upgrade Ubuntu desktop and use the command line to upgrade Ubuntu server, but the command-line method also works for desktop.
Ubuntu 20.04 New Features
- Improved ZFS file system.
- Computer manufacturer logo during boot
- Linux Kernel 5.4
- GNOME 3.36, which is way faster then previous versions.
- PHP7.4, Ruby 2.7, Python 3.8, OpenJDK 11.
- ZFS 0.8: includes native encryption
- and many more.
Note: Before doing the upgrade, you can use the systemback program to create a bootable ISO image from your current OS. If the upgrade fails, you can easily restore your OS with the bootable ISO. Everything on your OS including software and files will be intact. If you are using a laptop, please connect your power source.
Upgrade Ubuntu 19.10 to Ubuntu 20.04 with the Graphical Update Manager
First of all, open software updater
(aka update manager) from your application menu. It will update software package information. If there’s updates available, click the Install Now
button and enter your password to install updates.
If a new version of Linux kernel is installed, then the update manager will tell you to restart your computer. Click Restart Now
.
Then open up a terminal window and issue the following command.
update-manager
After checking for updates, the update manager will tell you that Ubuntu 20.04 is now available. Click the Upgrade button.
Next, enter your password. The release notes window appears. Click Upgrade.
The distribution upgrade window will open up. If you are notified that some third-party sources are disabled, accept it. You can re-enable them after the upgrade is finished.
In a few moments, you will be asked if you want to start the upgrade. Click the Start Upgrade
button.
Wait for the upgrade process to finish. The update manager may ask you if you want to restart services during packages upgrade without asking. Tick it on and click Next
button.
After new versions of packages are installed, the update manager may ask you if you want to remove obsolete packages. I always select Remove
.
Obsolete packages are software packages whose name can’t be found in the software repository of the new Ubuntu release. The cause of obsolete packages are the following:
- The upstream developer stops maintaining this package and there is no other person willing to take over. So the Ubuntu package maintainer decides to drop this package from the Ubuntu repository.
- The package becomes an orphan package, which means there’s no other package that depends on it and there are very few users of this package. So the Ubuntu package maintainer decides to drop this package from the Ubuntu repository.
- The package has a new name in the software repository of the new Ubuntu release.
After obsolete packages are removed from your system. Restart your computer and check your Ubuntu version with the following command.
lsb_release -a
Output:
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu Focal Fossa Release: 20.04 Codename: focal
Upgrade Ubuntu 19.10 to Ubuntu 20.04 From Command Line
You can use the command line to upgrade Ubuntu desktop or a headless server. If you use SSH to log into your Ubuntu server, it’s a good idea to keep your OpenSSH session alive by adding the following line in /etc/ssh/sshd_config
file on your server.
ClientAliveInterval 60
Save and close the file. Then restart SSH daemon.
sudo systemctl restart ssh
To upgrade to Ubuntu 20.04, first run the following command to upgrade existing software. (Please note that if a new Linux kernel is installed while running the following command, you need to reboot system in order to continue the upgrade process.)
sudo apt update && sudo apt dist-upgrade
Then make sure you have the update-manager-core
package installed.
sudo apt install update-manager-core
After that, run the following command to begin the upgrade process.
do-release-upgrade
Then follow the on-screen instruction to upgrade to Ubuntu 20.04. Basically, you need to press y
to answer the questions.
The update manager may ask you if you want to restart services during packages upgrade without asking. Press the Tab key to select Yes and press Enter.
If you are upgrading a server, you will probably see messages like below. I recommend choosing N
to keep your current version. The updated version will be available at the same directory. You can check it out later.
Once the upgrade is finished, reboot your Ubuntu desktop or server. To check your Ubuntu version, run:
lsb_release -a
Output:
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu Focal Fossa Release: 20.04 Codename: focal
How to Re-Enable Third-Party Repositories
Third-party repositories are defined in the .list
files under /etc/apt/sources.list.d/
directory. First, re-enable third-party repositories with the following command, which will remove the #
character in lines that begin with deb
.
sudo sed -i '/deb/s/^#//g' /etc/apt/sources.list.d/*.list
Then change all instances of eoan
to focal
.
sudo sed -i 's/eoan/focal/g' /etc/apt/sources.list.d/*.list
Update package repository index.
sudo apt update
Some third-party repositories don’t have an entry for Ubuntu 20.04, so you will likely to see errors like:
E: The repository 'http://linux.dropbox.com/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
You will need to edit these repository files one by one and disable them. For example, I edit the Dropbox repository file.
sudo nano /etc/apt/sources.list.d/dropbox.list
Disable this repository by adding the # character at the beginning of the line.
# deb [arch=i386,amd64] http://linux.dropbox.com/ubuntu focal main # disabled on upgrade to focal
Save and close the file. You need to wait for those repositories to add support for Ubuntu 20.04. Some software packages in third-party repositories might be included in 20.04. For example, Ubuntu 20.04 repository contains the nextcloud-desktop
package, so I don’t need the Nextcloud PPA anymore. I can delete the Nextcloud PPA.
sudo rm /etc/apt/sources.list.d/nextcloud-client.list*