Ubuntu 12.04 to 14.04 Upgrade

Posted April 21, 2014 58k views
I have an Ubuntu 12.04 LTS droplet, and I'd like to upgrade to Ubuntu 14.04 LTS. If I run 'do-release-upgrade', it returns no new releases, whereas running 'do-release-upgrade -d' will correctly get the new release. If I continue after doing the latter command, it says "no valid mirror found", and I don't want to update the sources.list file to 'trusty' in case the DO mirror isn't there. If this is a known thing and I should just say yes anyway, then I'll go ahead and do it, I'd just like to know whether doing this upgrade is going to ruin my droplet! Any help greatly appreciated, as I've not been able to find an answer anywhere so far.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
9 answers
By default, Ubuntu LTS release won't offer to upgrade to the next LTS until the first point release has been made. So do-release-upgrade won't show anything until Ubuntu 14.04.1 is released, which is scheduled for July 24th.

You can safely ignore the "no valid mirror" warning. You can see that the DigitalOcean mirror has trusty available:
Check out this tutorial for a full guide on updating from Ubuntu 12.04 LTS to Ubuntu 14.04 LTS.
You use digitalocean mirrors, but you can change this.

edit your /etc/apt/source.list to:

deb precise main
deb precise-updates main
deb precise-security main universe
deb precise universe
deb precise-updates universe

and the do-release-upgrade
I have created a Video about How to upgrade Ubuntu 12.04 to 14.04
12.04 LTS will receive automatic upgrade notifications when 14.04.1 point release is available, likely in July.

To upgrade existing 12.04.4 to 14.04

do-release-upgrade -d

or change codename in your /etc/apt/sources.list and all others in the .d dir (use sed if you know how).

After the upgrade, I think you need to choose a new kernel in the web console or manually edit /boot/grub/menu.lst.
Thanks Terry Wang

Your instructions seemed work great on my Droplet.

I did not need to change the kernel in the web cosole. at the end of the upgrade it says the server needs to be rebooted, I did that and it all just worked.
upgrade went well, then, during the update apache could not restart and getting a bunch of errors in apache error.log
One of them is python_init: Python version mismatch, expected '2.7.2+', found '2.7.3'.
Cant restart apache
@nezaboravi: Could you post all the errors found in /var/log/apache2/error.log ? You might also want to open a new question.
A bit late to the game but before people start running do-release-upgrade -d I'd like to take a minute to explain that this will cause your server to download the latest devel version of the 14.04 release. If you want to upgrade you can use the -p option to get the release version instead. do-release-upgrade -p
  • The -p flag actually just uses the upgrading logic from the proposed repository which contains unreleased versions of the upgrader package for testing purposes. From the man page:
      -p, --proposed        Try upgrading to the latest release using the upgrader
                            from $distro-proposed