How to Update a Ubuntu LTS release to the next LTS Version (release upgrade)

This document describes how to upgrade from Ubuntu 12.04 to Ubuntu 14.04 LTS. Generally, the Ubuntu .04 versions that get released every 2 years are Long Term Support (LTS) releases, for instance Ubuntu 12.04, 14.04 etc. Effectively, this means that the LTS release comes supported with bug fixes and security updates for as long as 5 years, hence users would not have the privilege of being alerted through popups urging them to install the latest available version.

1 Preliminary Note

This tutorial is based on Ubuntu 12.04 server, so you should set up a basic Ubuntu 12.04 server installation before you continue with this tutorial. The system should have a static IP address. I use 192.168.0.100 as my IP address in this tutorial and server1.example.com as the hostname.

 

2 Upgrading Existing Ubuntu LTS Release to the Next Available LTS

While this phenomena does not affect usage of regular Ubuntu releases, those users who are tempted to access updated features and the newest of applications have the option to upgrade the existing Ubuntu LTS on their system into the next available version, as explained below. 

Important: Before proceeding to upgrade, make a full backup of your data to an external device (USB stick or CD/DVD).

After proper backup of the data we will proceed as follows:

apt-get update
apt-get install update-manager-core

Then edit the file /etc/update-manager/release-upgrades:

 vi /etc/update-manager/release-upgrades

# Default behavior for the release upgrader.

[DEFAULT]
# Default prompting behavior, valid options:
#
#  never  - Never check for a new release.
#  normal - Check to see if a new release is available.  If more than one new
#           release is found, the release upgrader will attempt to upgrade to
#           the release that immediately succeeds the currently-running
#           release.
#  lts    - Check to see if a new LTS release is available.  The upgrader
#           will attempt to upgrade to the first LTS release available after
#           the currently-running one.  Note that this option should not be
#           used if the currently-running release is not itself an LTS
#           release, since in that case the upgrader won't be able to
#           determine if a newer release is available.
Prompt=lts

In above file you can use the option to upgrade either to LTS or normal release upgrade, the upgrade you want just put that in  Prompt=lts As we want LTS update so I chooses it.

Now we can proceed to the update by running this command:

do-release-upgrade -d

You will be prompted to ask for services update and other values, just select option yes and it will be completed in some time. It may take time to get distribution upgrades. In my case It took 20minutes, may be it may vary in your case.

After distribution upgrade it will ask for reboot, just do the reboot and after in next login prompt check in the bash prompt as :

cat /etc/lsb-release

[email protected]:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"
[email protected]:~$

Congratulations! You have successfully upgraded to Ubuntu latest LTS version of Ubuntu 14.04 :)

Share this page:

4 Comment(s)

Add comment

Comments

From: Ivo Krastev

Please, do not call it dist upgrade. Call it (release upgrade)

# apt-get dist-upgrade

!==

# do-release-upgrade -d

From: cocolocko

i have 10.04.4 LTS. if i will do "do-release-upgrade" will it upgrade to 12.04 or 14.04. ?

From: Anna

Thanks! Just what I needed :)

From: JohnP

The upgrade process will remove any PPAs, so you'll want to research any applications/servers that use those and ensure the programs have been ported to the newer LTS. Putting the new PPAs in after the update (hard to call some of these things "upgrades"). I 100% agree with Ivo's comment. On Ubuntu dist-upgrade is within the same release - newer kernels usually. I run a dist-upgrade as part of my weekly patching for 20+ servers here - no chance it will migrate from LTS-to-LTS.