‹ Articles

How to Upgrade Ubuntu 16.04 to 18.04

Don't upgrade unless you need to!

Operating system upgrades are risky. If something goes wrong during the update, your entire server and all of your data on it may be lost. Rather than update the operating system in place, it is a much better idea to create a new server on the correct version of Ubuntu and then migrate your data. In 2018, we launched a service to make migrations easier: DataShuttle. If you have any questions about that service, please get in touch with their support.

Ubuntu 16.04 will still receive full support, including patches, security updates, and bug fixes, until 2021.

Preparing to Upgrade

Important: Take a server snapshot at your provider before upgrading.

Once you've taken a snapshot of your server, SSH in to your server as root and run the following commands to make sure your server is ready to be upgraded to a new version of Ubuntu.

sudo apt-get update && sudo apt-get dist-upgrade
sudo dpkg --configure -a

If any of the above commands fail or print error messages, do not proceed with upgrading to a newer Ubuntu version.

Performing the Upgrade

All of the apps on your server will be down during the upgrade. Depending on your server's network connection and hardware, the upgrade may take anywhere from a few minutes to a few hours.

To upgrade your Ubuntu 16.04 server to Ubuntu 18.04, SSH in to your server as root and run the following command:

sudo do-release-upgrade -f DistUpgradeViewNonInteractive

Once the upgrade is complete, reboot your server.

If the upgrade completes without errors, take a new snapshot of your server so you'll have a snapshot of the server after the upgrade.

If the upgrade fails or encounters any errors, restore your server to the snapshot you made before you began the upgrade.


Last updated: April 02, 2019

Still Have Questions?

Don't hesitate to contact us if you can't find the answers to your questions.