Upgrade Ubuntu Server 16.04 LTS to 18.04 LTS

Update manager

Updating your existing installation

Although you are not required to do so, you are strongly recommended to update your existing 16.04 installation before proceeding. You can do this by first connecting to your server and running the following command.

sudo apt update -y && sudo apt dist-upgrade -y && sudo apt autoremove -y

Performing the upgrade to 18.04 LTS

To kick off the upgrade process simply run the below.

sudo do-release-upgrade -d

If you would like to run the upgrade without any prompts, you can use the following flag as shown below. Keep in mind that by using the -f flag you will not be asked to confirm the upgrade process.

sudo do-release-upgrade -d -f DistUpgradeViewNonInteractive

This will take a few minutes depending on your system, feel free to grab a quick cup of tea. When prompted with a shell, initiate a reboot.


Post upgrade

You can confirm that your upgrade was successful by checking your systems release.

lsb_release -a

Just as we did before starting the upgrade process, I would recommend updating your system once again. At this point your upgrade is complete, but ensuring you have the latest packages is usually a good idea.

sudo apt update -y && sudo apt dist-upgrade -y && sudo apt autoremove -y