Upgrade to Ubuntu 12.04 from Ubuntu 10.04 via the Terminal 15


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 with prompt in the file to prompt=lts if it’s not already set to lts. 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.

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

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

 

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!


Please share if you like it on:



Leave a Comment

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

15 thoughts on “Upgrade to Ubuntu 12.04 from Ubuntu 10.04 via the Terminal

  • Rob

    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

  • Sapan

    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

    • vinoth

      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

  • Dietmar

    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.

  • EarlW

    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

  • Jesse

    I tried this and all it did was stop half of my programs from running, change some graphics and it didn’t upgrade the distro

  • ashish patil

    error ensuring `/var/lib/dpkg/reassemble.deb’ doesn’t exist: Read-only file system
    No apport report written because MaxReports is reached already
    dpkg: too many errors, stopping
    Processing triggers for man-db …
    dpkg: unrecoverable fatal error, aborting:
    unable to flush updated status of `man-db’: Read-only file system
    touch: cannot touch `/var/lib/update-notifier/dpkg-run-stamp’: Read-only file system
    sh: 1: cannot create /var/lib/update-notifier/updates-available: Read-only file system

    while updating the ubuntu i am getting this error, plz help me..

  • MasEDI

    If you guys hitting 404 error,
    below my little solution,
    since Ubuntu old release package has been moved to the old archive, you should update your source.list file with below

    deb http://old-releases.ubuntu.com/ubuntu lucid main restricted universe
    deb http://old-releases.ubuntu.com/ubuntu lucid-updates main restricted universe
    deb http://old-releases.ubuntu.com/ubuntu lucid-security main restricted universe
    deb-src http://old-releases.ubuntu.com/ubuntu lucid main restricted universe

    save, and then try from the beginning.
    For more detail I found this tuts: http://www.joglohosting.com/articles/server-maintenance/how-to-upgrade-ubuntu-11-04-to-11-10-to-12-04-to-13-04.html