Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running lubuntu 10.10, and would like to upgrade to 11.04. I have a very temperamental internet connection, so would like to download all the packages before running the install.

According to this, there is no easy way to do this. The bug report mentioned in that thread is still open.

My question: Is there a way to hack do-release-upgrade to only download the packages, kind of like adding a "-d" to apt-get dist-upgrade?

Or is doing it manually the only way to get the results I desire?

If I have to do it manually, are these the steps needed to do it, or am I missing something?:

  1. Disable 3rd party repositories in /etc/apt/sources.list and /etc/apt/sources.list
  2. Change repositories in /etc/apt/sources.list from maverick to natty
  3. run sudo apt-get update
  4. run sudo apt-get -d dist-upgrade to only download the packages. Do this as many times as necessary until all the packages are downloaded.
  5. run sudo apt-get dist-upgrade to complete the upgrade process
share|improve this question
That seems close to what I would have done. – Jo-Erlend Schinstad Jul 27 '11 at 18:25

2 Answers

up vote 3 down vote accepted

Your first three steps are correct, but step 4 should be sudo do-release-upgrade. It should notice that all (or most) of the packages it was going to download are already present in /var/cache/apt/archives.

In some earlier versions of do-release-upgrade there was a bug where it would clean /var/cache/apt/archives before downloading the packages anew, but IIRC that bug's been fixed.

share|improve this answer
I did this and it worked. – Menachem Aug 29 '11 at 15:01

Disclaimer: I've never done this before. It might be a horrible idea. It might break everything, empty your bank accounts and flee to the south of Spain. As with anything potentially dangerous, make a backup before you do anything.


I'm not sure how much stuff you have installed, so this might be a flawed solution but you can upgrade from CD. Download the Alternate iso, mount it, and run the upgrade script.

wget -c http://releases.ubuntu.com/11.04/ubuntu-11.04-alternate-amd64.iso

Before I go any further, you don't have to use wget to get the image. Bittorrent will work well as with a standard download manager. The important thing is you want something that will resume, so you can stop downloading and pick it up at another time. This is what wget's -c flag will do.

Once you have the ISO, the next step is fairly simple:

sudo mount -o loop ubuntu-11.04-alternate-amd64.iso /media/cdrom
sudo sh /media/cdrom/cdromupgrade

The flaw that I talked about is this will only upgrade things integral to Ubuntu that are included on the CD. It won't upgrade your other packages.

In theory this should be fine. You might find that some applications break, some might be forcibly removed by the updater, but the core OS should remain stable.

If my theory is right, this will then let you upgrade your other packages using as and when you want to through Synaptic or (if you install it) aptitude.

share|improve this answer
What if the south of Spain is closer? – Matt Joiner Jun 23 '12 at 12:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.