Upgrade to Ubuntu 12.04 from Ubuntu 10.04 via the Terminal

Few weeks back we showed you how to upgrade to Ubuntu 12.04 from 10.04. That tutorial showed you how to do it from Ubuntu Desktop. Doing it from the desktop is easy and is the best option for new users. To read that post, click here.

However, Ubuntu can also be upgraded via the command console and for some users, this method is the easiest and fastest. This brief tutorial will show you how to upgrade Ubuntu via the command console if you prefer this method.

 

 

Objectives:

  • Upgrade to Ubuntu 12.04 (Precise Pangolin) from Ubuntu 10.04 (Lucid Lynx) via the Terminal
  • Enjoy!

 

To get started, press Ctrl – Alt – T on your keyboard to open the Terminal. When it opens, run the commands below to install update-manager-core if isn’t already installed.

 

sudo apt-get install update-manager-core

 

update_to-precise-from-10_3

 

Next, run the commands below to open update-manager’s release upgrade file.

sudo vi /etc/update-manager/release-upgrades

 

update_to-precise-from-10

 

Then, change the line below from prompt=lts to prompt=normal.  To change it, scroll down to the line press the X key on the keyboard to delete each character. Then hit the I key and begin typing the new line. When you’re done, press Esc key, then type :wq to save and exit.

 

update_to-precise-from-10_1

 

Next, run the commands below to update all packages installed before you upgrade.

sudo apt-get update && sudo apt-get upgrade

 

update_to-precise-from-10_4

 

Finally, run the commands below to begin the upgrade process.

sudo do-release-upgrade

 

update_to-precise-from-10_5

 

When ask if you want to continue with the upgrade, type Y for yes.

 

Enjoy!

9 comments on “Upgrade to Ubuntu 12.04 from Ubuntu 10.04 via the Terminal
  1. Rob says:

    In my case, the above steps appeared to suceed until I tried “sudo do-release-upgrade”. Terminal:

    #> sudo do-release-upgrade
    Checking for a new ubuntu release
    Failed Upgrade tool signature
    Failed Upgrade tool
    Done downloading Failed to fetch
    Fetching the upgrade failed. There may be a network problem.

    Any ideas?

    Cheers,
    Rob

  2. Sap says:

    I got the same error as Robz

  3. Thom says:

    These instructions fail, packages no longer on the server, lots of 404 failures

  4. Sapan says:

    Before you do the do-release-upgrade, change the release-upgrades file back to the original as prompt=lts and then run do-release-upgrade.
    It atleast started the upgrade process

    • Oche says:

      This worked for me! Thanks a lot!

    • vinoth says:

      root@pcz-ee205855-2:~# do-release-upgrade
      Traceback (most recent call last):
      File “/usr/bin/do-release-upgrade”, line 10, in
      from UpdateManager.Core.DistUpgradeFetcherCore import DistUpgradeFetcherCore
      File “/usr/lib/python2.6/dist-packages/UpdateManager/Core/DistUpgradeFetcherCore.py”, line 34, in
      import GnuPGInterface
      ImportError: No module named GnuPGInterface

  5. Dietmar says:

    I tried this, but then got the following message:

    An unresolvable problem occurred while calculating the upgrade:
    E:Error, pkgProblemResolver::Resolve generated breaks, this may be
    caused by held packages.

    This can be caused by:
    * Upgrading to a pre-release version of Ubuntu
    * Running the current pre-release version of Ubuntu
    * Unofficial software packages not provided by Ubuntu

    If none of this applies, then please report this bug against the
    ‘update-manager’ package and include the files in
    /var/log/dist-upgrade/ in the bug report.

    Restoring original system state

    Aborting
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Building data structures… Done

    Any idea what I can do ? I tried to install it before via the update manager but it always got stuck.

  6. EarlW says:

    This fails at the last step. Probably because 10.04 is an LTS release.
    I got:
    Failed Upgrade tool signature
    Failed Upgrade tool
    Failed to fetch
    Fetching the upgrade failed. There may be a network problem.

    I got it to work by NOT changing the prompt=normal.
    It should be prompt=lts

  7. pawan says:

    Thank you , very helpful to me

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>