Simple Way to Update Ubuntu Edgy With Slow/No Internet Connection
One of the biggest hurdles for the already popular distribution Ubuntu in gaining still more popularity all across the world, is the limited number of applications shipped as part of the distribution media. Where most of the distributions provide users with the option of downloading a number of CD/DVDs(Fedora, SUSE, Debian) at one time, Ubuntu follows the philosophy of keeping things simple by offering only 1 CD/DVD worth of software, that includes one popular application per task(one web browser, one text editor, one media player etc), allowing users to download and install additional applications whenever needed from the Internet repositories. Though I personally like this philosophy very much(which is also one of the reasons why I like GNOME more than KDE), this works well only for those users who either don’t require anything more than the installed default applications or those who have a fast Internet connection to download the necessary additional applications. The users with slow/no Internet connection are left wanting in this kind of setup as it is almost impossible to conveniently add more applications to Ubuntu without decent Internet connectivity. This is the primary reason why many of my friends go for the distributions like Fedora or SUSE, or even Debian, rather than Ubuntu or Gentoo, even if they like the latter distributions more.
One workaround for this problem is to follow the elaborate procedure described in my earlier post to update and install new applications on Ubuntu without needing a fast Internet connection. With the latest version of Ubuntu - Ubuntu 6.10(Edgy Eft) - though, the procedure has become fairly straight-forward, thanks to a feature added to the Synaptic Package Manager just for solving this problem. You can get the entire idea by just looking at the two new options present in the File menu in Synaptic Package Manager; otherwise, below is an example of how to install an application on Ubuntu by using the Internet connection of a second machine.
Simple Way to Install Applications in Edgy Without Internet Connection
- Start Synaptic Package Manager(SPM). Mark all the applications that you want to install/upgrade in the usual way. For example, go to “Edit -> Search”, enter ‘gnuplot’ in the search field and then press ENTER or click “Search”.

From the list shown, mark ‘gnuplot’ and ‘gnuplot-doc’ pacages for installation. After that, instead of clicking the “Apply” button from the toolbar as you would normally do, go to the File menu and select “Generate Package Download Script” menu option to generate the download script.

- A dialog box will prompt to save the generated script file. Give it a name like ‘ubuntu.sh’ and click the “Save” button. This script file needs to be carried to a machine which has a fast Internet connection and it needs to be executed there.
NOTE: It will be convenient if the machine with fast Internet connection runs some flavour of GNU/Linux operating system with wget installed on it. If that is not the case, then one needs to tweak the generated script file(ubuntu.sh in our case) to use whatever command line download manager is available on that machine. The first line may also need to be removed if the script is to be run on a Windows machine. Looking at the contents of the generated script file might give a better idea, as shown below.

- Start a shell/command prompt, change to the directory where you want to store the downloaded files and run the script as shown:
sh# sh ubuntu.sh
Once the downloads are finished, carry all the downloaded files to the Ubuntu machine and copy them to a new folder(say ‘Downloads’) in the home directory.
- Start Synaptic Package Manager again and select the same application(s) that you had selected in Step 1. Select “Add Selected Packages” from the File menu and browse to the folder where you have copied the downloaded files(’Downloads’ folder in our example). Click “Apply” button from the toolbar. The packages will be installed from the local directory without the need to connect to the Internet.
Additional Notes:
- It is always a good practice to first update the Apt cache before marking any packages to be installed/downloaded. This can be done by clicking the “Reload” button in Synaptic Package Manager or by running the command “sudo apt-get update” in a shell. Any way you do it, it requires an Internet connection, how ever slow it might be. If there is absolutely no Internet connection available on the Ubuntu machine(why, oh why, did you chose Ubuntu in the first place ;) ), then you need to keep the cache synchronised with another Ubuntu machine that is frequently updated. See the comment section of my earlier post for more information.
- If the machine that has a fast Internet connection is Windows or doesn’t have wget installed, the script file can either be manually edited, or a converted script can be written, to make it work under such an environment. But writing your own script/program to directly generate the download script in required format should be a more productive exercise. A download script similar to what is generated by the Synaptic Package Manager can easily be generated by processing the output of ’sudo apt-get install
‘ command. - Lot of discussion is taking place on how to provide options to upgrade Ubuntu systems offline(snapshots at regular intervals can be released as ISO files, for example), the specification for implementing such a feature is going through active debate among the Ubuntu community members, so if you are interested, you can check out the following pages:
Related Posts:
Readers who viewed this page, also viewed:
- Update or Install Applications on a Gentoo Machine Without an Internet Connection
- Update or Install Applications on Debian/Ubuntu Without an Internet Connection
[...] Update: There is a simpler way for the Ubuntu 6.10(Edgy Eft) users: Simple Way to Update Ubuntu Edgy With Slow/No Internet Connection [...]
QuotePingback by Every Flavour Beans » Update or Install Applications on Debian/Ubuntu Without an Internet Connection — November 3, 2006 @ 3:37 pm
For Debian Sarge, Testing, Sid and for all Ubuntu (Brezzy, Dapper, Edgy,.. etc):
1.- apt-get update
2.- apt-get -y –print-uris install gnuplot | egrep ‘http|ftp’ | awk ‘{print $1}’ | tr -d “‘” | sort | tee -a /REMOVABLE/install_deb.txt
* REMOVABLE = USB, Diskette, zip, etc.
* –print-uris install = –print-uris upgrade , –print-uris dist-upgrade, etc
3.A.-WINDOWS:
3.A.1.- Download wget-complete-stable.zip :
ftp://ftp.sunsite.dk/projects/wget/windows/wget-complete-stable.zip
3.A.2.- Unzip wget-complete-stable.zip
3.A.3.- wget -i install_deb.txt
3.B.-LINUX:
3.B.1.- wget -i install_deb.txt
QuoteComment by Bomper — November 3, 2006 @ 8:55 pm
There is a script to handle an apt-medium at:
http://wiki.debian.org/AptMedium
QuoteComment by HB10 — January 12, 2007 @ 8:05 pm
[...] Fuente | Every Flavour Beans [...]
QuotePingback by DAMR.NET » [HOWTO] Como Instalar Paquetes de Ubuntu o Debian en Una Computadora Sin Conexion a Internet o con Baja Velocidad de Descarga — May 23, 2007 @ 8:53 am
I am trying to do this but i do not understand how to run your command. Im trying to install gramps so my file is gramps.sh (I assumed the .sh ext is important or i would make it gramps).
So step 3 is my problem presumably because i do not understand how scrips work or wget. I opened a terminal cd to my Desktop and ran ’sh# sh gramps.sh’ and got bash: sh#: command not found.
I then tried ’sh gramps.sh’ without any luck
I have tried alot including the wget command from the script
I think i am missing something fundamental about wget. Please explain.
QuoteI am using feisty for both comps. Cheers
Comment by Elias — June 13, 2007 @ 4:25 am
nevermind i realized that the synaptic scrypt automatically added -c immediately befor the http address making it unintelligible to wget. Why might this be happening?
QuoteComment by Elias — June 13, 2007 @ 4:28 am
-c options tells wget to continue/resume the download of partially downloaded packages(in case the downloads were interrupted the first time the script was run and we don’t want the downloads to be started from the beginning). It’s a reported bug in Feisty(Edgy didn’t have this problem) and might get fixed in a future update(immediate fix available here).
A space needs to be present between the ‘-c’ option and the url. Synaptic is generating this in feisty:
wget -chttp://archive.ubuntu.com/….
It should be generated like this:
wget -c http://archive.ubuntu.com/….
So all you have to do is manually edit the generated file and add those required spaces. Those who know Perl(or such) can write a simple script to automate the process.
QuoteComment by tabrez — June 17, 2007 @ 1:00 am
[...] Ubuntu Edgy Eft was the first version to introduce this feature to Ubuntu users: Those who can’t download large packages on, say, a home machine can just mark the packages to be installed in Synaptic Package Manager and then let it generate a download script. This script can be carried to a machine with good Internet connection and executed there to download all the required files. The download files can then be carried back to the home machine to complete the installation of selected packages through Synaptic Package Manager. I have explained the complete procedure in an earlier post: Simple Way to Update Ubuntu Edgy With Slow/No Internet Connection [...]
QuotePingback by ‘wget -c’ Bug in Download Script Generated by Synaptic in Ubuntu 7.10(Feisty Fawn) — September 16, 2007 @ 1:34 pm