Can I make do-release-upgrade only download packages for a later upgrade?
Your first four steps are correct, but step 5 should be sudo do-release-upgrade
(instead of sudo apt-get dist-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.
I wrote a script to do this, for my own upgrade of multiple machines to Ubuntu 14.04 "trusty". It is called 'apt-get-other-release'. Simple use:
$ sudo apt-get-other-release -t trusty
[ a long time passes as it downloads stuff ]
$ sudo apt-get-other-release -U
[ it prepares the system for upgrade -- this is quick ]
$ sudo do-release-upgrade # or update-manager, whatever you're comfortable with
[ upgrading also takes a long time and may still download some additional stuff ]
The script is at:
ftp://www.lubkin.com/pub/user/filbo/apt-get-other-release
and version 1.0 has sha1sum: 87a466b2bb2d1ac5b0a08509246a450b8d1c7617
Behind the scenes it's basically running apt-get update; apt-get -d dist-upgrade
with its own private set of sources.list files. Results are stored in /var/cache/apt-$to_rel/archives, and the '-U' flag copies those into system-wide /var/cache/apt/archives so that they will be present during your upgrade.
You could also copy the upgrade archive from one local host to another, saving bandwidth. I did this for an amd64 and an i386 upgrade, copying only those *.deb which didn't have "amd64" in their names; then ran another apt-get-other-release -t trusty
on the i386 machine, which downloaded another large pile of packages since the two machines had different stuff installed on them.
Feedback appreciated; email cc appreciated, as I don't know when I will next look at askubuntu. Search engines are well aware of me.
NOTE: I have not actually done an upgrade of a system so-treated! Some time in the next week. Getting this script out while it might be of some use to people.
>Bela<
There is a way to get the update manager to do steps 1-3 for you.
Run
sudo update-manager
from a terminal window in the GUI (this is important)- Start the update manager, tell it you want to upgrade to the next version of Ubuntu, and let it start running. It will disable 3rd party repositories, change the main repositories to the latest version, and then run
sudo apt-get update
for you. - It will then pop up a screen telling you that in order run the update, it will have to remove, install, and upgrade packages.
- At this stage, go to the terminal window and force-quit the program using CTRL-C. [If you don't do this, and cancel the update via the cancel button of the update manager, it will revert the changes ].
- Start the update manager, tell it you want to upgrade to the next version of Ubuntu, and let it start running. It will disable 3rd party repositories, change the main repositories to the latest version, and then run
run
sudo apt-get -d dist-upgrade
from the command line as many times as necessary, until all the packages are downloaded and ready to installrun
sudo do-release-upgrade
and let it complete the upgrade with the already downloaded packages.Re-enable 3rd party repositories, and run
sudo apt-get update && sudo apt-get upgrade
again to update 3rd party repositories to the latest version (make sure the repositories are updated to the latest release of ubuntu)