View Full Version : [ubuntu] Ubuntu Offline Updater

January 1st, 2010, 01:08 PM
i have wrote scripts that could help in updating and/or installing
any software in ubuntu without having a direct internet connection in
the system. Take a look at https://sourceforge.net/projects/ubuoffupdater/
for the package. Feel free to contact me if it is difficult to follow.

January 1st, 2010, 01:24 PM
Great idea!

That would have been very useful to me a couple years ago...

Good job!

January 1st, 2010, 03:00 PM
I usually use Keryx (http://keryxproject.org/) for this sort of thing.

January 1st, 2010, 03:34 PM
I just stumbled across the Synaptic Package Download Script (https://help.ubuntu.com/community/InstallingSoftware#Use%20the%20Synaptic%20package% 20download%20script) and it seems to be working pretty well. Have only tried it twice, but success both times.

This is with two PC's running Ubuntu 9.04. The desktop PC at home is on a slow dial-up connection. At least I can ask Synaptic to "Reload" and that helps quite a bit. Easier than a PC that's completely off-line. The laptop goes into town and runs the script.

How does your script differ from the above utility? What I really like about Package Download Script is it was very easy, all GUI, so I wouldn't hesitate to recommend to someone unfamiliar with Linux.

January 2nd, 2010, 10:45 PM
How does your script differ from the above utility?

If the target computer is completely offline, and you can't run apt-get update, you will need to update the package lists before using the Synaptic Package Download Script (otherwise Synaptic will have no idea what packages are available). That's what prasannatsm's script does for you.
For installation, he recommends you use "apt-get -d -f <your-packages>" which will give you a list of URLs to download (much like SPDS, but not all GUI).

January 10th, 2010, 03:19 AM
Kind of ironic - I've tried several times to get to the OP's site on sourceforge on our dial-up connection. The wheel spins and spins and nothing happens and I give up.

January 25th, 2010, 09:57 PM
Finally got to SourceForge. The OfflineUpdater is a tiny script. Downloaded almost instantaneously, even on dial-up!
Problem is, I don't know what to do with it. Opened the tar, but the directions assume a level of competency which I do not possess.

I'd like to try and get this to work! I don't really need an Offline Updater, but would like to share the steps with others who do.

January 25th, 2010, 11:08 PM
Here are some more comprehensive instructions on how to use UbuntuOfflineUpdater:

The following steps must be performed on your offline "target" machine.

Create a new folder on a flash drive and call it "UbuntuOfflineUpdater"
Download and extract the UbuntuOfflineUpdater.tar.bz2 file to the new folder
Open a terminal and navigate to the new folder

$ cd /media/<flash drive name>/UbuntuOfflineUpdater/(Note: you can find what drives are available by running 'ls /media/')
Run the gen_repo_downloader.sh script with this command:

/media/<flash drive name>$ sh gen_repo_downloader.sh

Now take the flash drive to an online *nix machine and mount it.

Open a terminal and navigate to the UbuntuOfflineUpdater folder

$ cd /media/<flash drive name>/UbuntuOfflineUpdater/
Run the repo-downloader.sh script

/media/<flash drive name>$ sh repo-downloader.sh

Take the flash drive back to your offline machine and mount it.

Copy the downloaded index files to the /var/lib/apt/lists/ folder
Open a terminal and change the files' permissions to 644 with this command

$ sudo chmod 644 /var/lib/apt/lists/
Make APT read the package lists with this command

$ sudo apt-cache gencaches

Now you need to get the links to the .deb files for the packages you want to install.

Run this command, replacing <your packages> with the names of the packages you want to install

$ sudo apt-get -d -f <your packages>Copy and paste the links generated by that command to a text file and save it to your flash drive

You can now use any means you want to download those files to your flash drive on a Net-connected machine. I recommend the DownThemAll (http://www.downthemall.net/) Firefox extension.

Once you have the files, put them on your flash drive in a directory called "packages." Then open up the Terminal and navigate to the folder

$ cd /media/<flash drive name>/packages/
Now install your packages using this command:

/media/<flash drive name>/packages/$ sudo apt-get -o dir::cache::archives="./" install <your packages>

Although the upcoming version of Keryx (0.92.4) will automate much of this process, I applaud prasannatsm for taking the time to write this software. I hope that someone will find these instructions to be helpful.