This step by step guide shows how to upgrade Ubuntu 18.04 LTS server to 20.04 LTS over an SSH connection or otherwise.
Ubuntu 20.04 LTS is released with new kernel and new features. If you are running an Ubuntu server, you might be wondering about upgrading to Ubuntu 20.04 LTS server.
In this tutorial, I’ll show you the steps to upgrade Ubuntu server version from 18.04 to 20.04 LTS.
Upgrading to Ubuntu 20.04 LTS server from 18.04

Before you go on upgrading your server, you should keep a few thing in mind.
The server upgrade process may take half an hour or more and this will result in downtime. If you are running a web service like WordPress or some other public facing service, be prepared for your services to be offline for some time.
This is why you should only upgrade to the new version when it is really critical.
Second thing is to make a backup of your server. I use Linode cloud platform for my servers and creating a backup of the entire server image is just a matter of a few clicks.
With that in mind, let’s see how to upgrade to Ubuntu 20.04 server.
I am using root for running the commands. If you are not logged in as root, you should have sudo rights and run these commands with sudo.
Step 1: Update your system
Log in to your Ubuntu server. If you it’s a remote system, use SSH to log in. I mean you already know how to access your server, right?
Update your Ubuntu server first for any pending software update:
apt update && apt dist-upgrade -y
Step 2: Configure Update Manager
Ubuntu provides a crucial tool called Update Manager for upgrading your system to a newer version.
Normally, it should already be installed but do verify that your Ubuntu server has update manager tool installed:
apt install update-manager-core
Next, you should check the content of the /etc/update-manager/release-upgrades file and make sure that the last line is Prompt=lts and it is not commented out.
This means that your Ubuntu system will be updated to a new stable LTS version. It looks something like this:

Step 3: Upgrade Ubuntu server to a new LTS version
Once you have made sure of that, you can upgrade your Ubuntu 18.04 server to Ubuntu 20.04 LTS with this command:
do-release-upgrade
You may see a message like this that says it cannot find a new version to upgrade to.
Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS develoment release
set Prompt=normal in /etc/update-manager/release-upgrades.
If you do, you can force the upgrade with -d option like this:
do-release-upgrade -d
The -d option forces to look for development release which is 20.04 at present.
The rest of the procedure is basically pressing enter to what it demands.
Upgrading Ubuntu server over SSH connection? Pay attention!
If you are using SSH to log in to your system, you should see a warning message like this:
This session appears to be running under ssh. It is not recommended
to perform a upgrade over ssh currently because in case of failure it
is harder to recover.
See, the version upgrade procedure needs your input at several steps. If you are doing it over SSH and your connection gets disconnect, what happens to the upgrade? Will it hang? How will it receive the critical user input to proceed with the upgrade?
Don’t worry. Ubuntu is intelligent. The do-release-upgrade tool takes care of this. It automatically opens a new ssh session at port 1022 with screen. If you have custom firewall, you must open the port 1022.
iptables -I INPUT -p tcp --dport 1022 -j ACCEPT
If you get disconnected from the server in the middle of the upgrade, you can reconnect and recover the session by connecting to your server through ssh but at port 1022 like this:
ssh [email protected]_ip_address -p 1022
If you don’t see the upgrade procedure running, use the screen command like this:
screen -x
Follow the on screen instructions and you should be upgraded to the new server in around 20-30 minutes (or even less).
I noticed that it took considerable time at the step where it upgrades LXD. I almost thought that my SSH connection hanged.

And if you screens like the one above where you have to make a choice, press tab to switch between the choices and enter to confirm your input.
After the upgrade completes, you have to restart your Ubuntu server. You can verify that you are using Ubuntu 20.04 with lsb_release -a command:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
I hope you liked this quick little tutorial helpful in upgrading to Ubuntu 20.04 LTS server.
Have questions? Please feel free to ask.
I also use Linode cloud servers. When I saw that you use Linode, I decided to follow your guide. Unfortunately I ran into an error that may indicate that the mirrors used by Linode are problematic. Or maybe the mirrors were temporarily unavailable? Following are pertinent error messages.
>>After updating your package information, the essential package ‘ubuntu-minimal’ could not be located. This may be because you have no official mirrors listed in your software sources, or because of excessive load on the mirror you are using. See /etc/apt/sources.list for the current list of configured software sources.
In case of an overloaded mirror, you may want to try the upgrade again later.<>## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirrors.linode.com/ubuntu/ bionic universe
# deb-src http://mirrors.linode.com/ubuntu/ bionic universe
deb http://mirrors.linode.com/ubuntu/ bionic-updates universe
# deb-src http://mirrors.linode.com/ubuntu/ bionic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.linode.com/ubuntu/ bionic multiverse
# deb-src http://mirrors.linode.com/ubuntu/ bionic multiverse
deb http://mirrors.linode.com/ubuntu/ bionic-updates multiverse
# deb-src http://mirrors.linode.com/ubuntu/ bionic-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirrors.linode.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://mirrors.linode.com/ubuntu/ bionic-backports main restricted universe multiverse<<
Does your system reference these same mirrors?
Should I try again later, or do you recommend substituting in different mirror sources? I'm feeling tentative about substituting, and could use a bit of guidance on how to do so.
Is this message stopping you from the upgrade? It seems to be a warning rather than error.
The formatting on the error messages that I gave in my post did not come through correctly. The point in the document with “##N.B.” is the end of the error message and the beginning of a cat of the document cited in the error message: /etc/apt/sources.list.
Does that clarify the situation sufficiently? The message says basically that the upgrade did not complete and to try again later.
I can try again tomorrow, but I did want to check in about whether the “scary messages” about ENTIRELY UNSUPPORTED software called for any special handling before making another attempt.
LOL, looks like my clarification on the barrier between the error message and the file listing was also cleansed/filtered.
Here is the error message and only the error message.
$ After updating your package information, the essential package ‘ubuntu-minimal’ could not be located. This may be because you have no official mirrors listed in your software sources, or because of excessive load on the mirror you are using. See /etc/apt/sources.list for the current list of configured software sources.
In case of an overloaded mirror, you may want to try the upgrade again later.
Quick question… assuming all goes smoothly, how long, if at all, will the system be unresponsive (excluding the eventual reboot). IOW, how long would a website or mailserver, etc. be unavailable? Seconds or minutes, etc?
It is usually recommend to disable the web services during the upgrade process. Because if some of the components that are used by the services are being upgraded, the services will be unresponsive anyways.
For me, the entire upgrade process took 25 minutes but I cannot say anything about the exact time services will be offline.
Thanks! Some minor corrections:
1) Above “Step 1” reads, “I am using root for running the commands. If you are not logged in as root.”… should presumably include a reference to “sudo”
2) In “Step 2”, I think “last line is Prompt=lts and it is commented out” should read “…and it is NOT commented out.”
Indeed. Thanks. I have updated the article now.