Upgrade an existing Ubuntu installation to 18.04 Bionic Beaver


You need an existing Ubuntu 16.04 LTS or 17.10 install.


An existing Ubuntu 16.04 LTS or 17.10 install with root privileges.




  • # - requires given command to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - given command to be executed as a regular non-privileged user


The latest Ubuntu release, 18.04, marks an opportunity for both LTS users and people on the previous 17.10 release to update Ubuntu and take advantage of the latest features. Thanks to Debian's upgrade process, it should be relatively simple to either upgrade Ubuntu 16.04 to 18.04 (both LTS) or to upgrade Ubuntu 17.10 to 18.04 LTS Bionic Beaver.

Note also that you can check your Ubuntu version following our guide on this topic: How to check Ubuntu version

Run your Ubuntu Update

Before you do anything, make sure that your system is already up-to-date. Run a full Ubuntu update and upgrade with Apt.
$ sudo apt update 
$ sudo apt upgrade
$ sudo apt dist-upgrade
This will help to ensure that the difference between packages is as small as possible. It also will be the way that Canonical has most likely tested the upgrade themselves, so it's least likely to encounter bugs. Lastly, before you begin to upgrade Ubuntu to 18.04 LTS you may also want to remove all no longer required packages using:
$ sudo apt dist-upgrade

How to Upgrade Ubuntu The Ubuntu Way

Ubuntu have developed their own automatic way of upgrading between releases. It essentially scripts the traditional Debian approach. This way, you can set it up to upgrade and walk away. Ubuntu will handle the rest. If you want to take this route, you're going to need to install one package first. So, do that.
$ sudo apt install update-manager-core
When that finishes, run the Ubuntu upgrade utility.
$ sudo do-release-upgrade

Ubuntu release upgrade tool

Ubuntu will ask you a couple of questions about how you want to handle the upgrade, and it'll start off upgrading your system. If you're doing this too soon(Bionic is still in beta), it will tell you that there is no release available. In that case, add the -d flag at the end of the command to pull a development release.
$ sudo do-release-upgrade -d

How to Upgrade Ubuntu The Debian Way

Change Your Sources

If you've selected the traditional Debian path, you're going to need to change the /etc/apt/sources.list file and replace the name of your previous release with bionic. So, if you're on 16.04, replace every instance of xenial with bionic. If you currently have 17.10, replace artful with bionic.

Ubuntu Bionic Beaver Sources

Then, look in /etc/apt/sources.list.d/. Change any files in there the same way. If you end up getting an error when you try to update Ubuntu, use artful until those repositories are updated.

Ubuntu Update and Ubuntu Upgrade

Now, you can run the Ubuntu dist upgrade. First, update the Apt sources. Then, run the Ubuntu upgrade.
$ sudo apt update && sudo apt -y dist-upgrade

Ubuntu Bionic Beaver Desktop

The upgrade should take a bit of time. Chances are, every package on the system will be upgraded. When the Ubuntu upgrade does finish, reboot the system. When the system comes back up, you'll be running Ubuntu 18.04 LTS Bionic Beaver!

Closing Thoughts

That's all there really is to it. You should notice that your login screen is different, especially if you were on 16.04. Depending on your choices during the Ubuntu dist upgrade, the system will automatically make the switch from Unity to GNOME for you. This procedure will also work on servers. It's exactly the same. Just be especially careful of any external repositories and version upgrades like PHP.