How to upgrade Ubuntu 14.04 to 16.04

If you are still running Ubuntu server 14.04, which will be End of Life this Aril 2019, so you should upgrade to 16.04 or 18.04. You can check out Ubuntu Release dates at https://wiki.ubuntu.com/Releases Even though Linux is more secure, that does not mean it should not be kept up to date, to keep your data safe. Longer you keep put out the updates harder it gets, due to many changes on each upgrade. You can check out my post on How to secure your Ubuntu server. Make sure you have a good backup and your backup is tested to be sure data you are backup are good. If you have an option you can do an upgrade on a test server and work out any issues, that way when you do upgrade on production system it goes smooth.

Check list before starting upgrade process

  • Data backed up and verified
  • Make sure your application supports newer packages versions
  • List of application/services so it can be tested after the upgrade
  • Direct access to the server, remote session will give you an error
  • Stopping application/services, not required but if dealing with a database it’s safer
  • Double check storage space for an upgrade to download/install

Login to server directly to do the upgrade
Command: sudo do-release-upgrade

It will go through a list of currently installed packages and then let you choose if you want to go for the upgrade or not.  If you need more details you should press d otherwise press y and ENTER

You may get a message like this select Yes, so if any services needed to be restarted it will automatically without asking you each time. It will start the process of removing obsolete packages, downloading, installing and setting up automatically, unless you have chosen No.

You may get this message and you can make your own choice to keep current version or install newer, you can select to show differences between the versions

It will go though upgrade process, then if everything goes well you should see message System upgrade is complete, then restart by pressing y and Enter key, so your server can restart to finish upgrading.

If everything went well you should see login screen

After an upgrade, you should do the following

  • This will check for any updates:
    • sudo apt-get update
  • This will install any updates that it found:
    • sudo apt upgrade
  • This will remove any packages no longer needed:
    • sudo apt-get autoremove 
  • Then check your application/services to make sure they are running and if there any errors fix it.

That’s it, hope this helps out someone out there, good luck

Common issues and solutions:

If you are remotely doing upgrade you will get this warning, if something goes wrong with your SSH connection while you are in the middle of an upgrade, then you would have issues getting into your server

You may have issues with PHP version, most likely you may have been running version 5.6, installing the PHP7.0 might fix your issues or newer version:

sudo apt-get install -y libapache2-mod-php7.0



Leave a Reply