Installing Packages on Computers with Slow Connections Redux July 8, 2006Posted by Carthik in administration, commands, guides, maintenance, ubuntu.
Earlier, I had written about using apt-zip to upgrade computers on slow internet connections by using a faster machine to do the downloads. However, since that involves understanding how apt-zip works, and a small learning curve, here is a hack that should work pretty well, in spite of it’s hackish nature.
The tip here will let you install new packages (and their dependencies) or upgrade a system by using a faster internet connection to do the downloading. First we get the URIs for the pacakges to be downloaded, then we download the packages and transport them to the computer with the slower connection. Thanks to Ewan for this tip posted to the ubuntu-users list a long time ago.
1) On the computer you wish to install something new on (or upgrade), do a
$sudo apt-get update
2) Then use apt-get to generate a list of the packages it needs to download, in order to install the package that you need, but not download them:
$sudo apt-get -qq --print-uris install name-of-package | cut -d\' -f 2 > urilist
this gives you a file ‘urilist’ in the same directory as the one in which you ran the previous command, with a list of files to download.
3) Take your list to a machine with a fast internet connection and download the packages using wget:
$wget -i < urilist
4) Take your newly downloaded debs home and copy them into the
5) Rerun the same apt-get command, but without any special parameters:
$ sudo apt-get install name-of-package
apt-get should tell you the quantity of packages that it will install,
and how much it will download. The download amount should be zero since
the packages are already downloaded.