A USB repository
If you have a decent sized USB stick - assuming around 4-8Gb (or external hard drive) you can set up a custom copy of the Ubuntu repository and configure that as a local repository as covered in
AptGet/Offline/Repository on help.ubuntu.com.
To get the actual package files (the .deb files), I suggest using
apt-mirror.
The
apt-mirror package will help you create a custom mirror which should be smaller than the 30Gb of the full repository. Install the package:
sudo apt-get install apt-mirror
and edit its configuration file
gksudo gedit /etc/apt-mirror/mirror.list
or since Ubuntu 14.04
gksudo gedit /etc/apt/mirror.list
Only include the repository sections you want. Here is a simple example that copies the binary .deb files from all 4 sections (main, restricted, universe and multiverse) as well as the latest bug fixes.
# apt-mirror configuration file
##
## The default configuration options (uncomment and change to override)
##
#
set base_path /tmp/ubuntumirror
#
## Repositories to copy from -
## use a mirror so you don't overload the main server!!!
# Lucid binaries - no source files
deb http://archive.ubuntu.com/ubuntu lucid main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu lucid-updates main restricted universe multiverse
## Clean up older .deb files no longer in the archive
clean http://archive.ubuntu.com/ubuntu
It is guesstimated that you will need around 15Gb of space for all 4 sections, without the source.
I have put the path for all the .deb files to be
/tmp, make sure you have enough space so your hard drive does not fill up (if your hard drive does fill up and your computer freezes,
/tmp should be cleared with a reboot).
If you just want the main files, remove the restricted, universe and multiverse names from the configuration file.
If you are using a different architecture (you have 64bit, but your friend has 32 bit) then add the following at the start of the
mirror.list configuration file:
set defaultarch i386
Once you have the
apt-mirror configuration you want, run
apt-mirror and go do something fun or life changing as it will take hours or days to get the repository (depending on your connection and the Ubuntu mirror you are using).
Once you have the .deb files, copy the files to your USB memory stick (or external hard drive) and set up the local repository as per the article mentioned previously.
Test it works before taking it to your friend!
sudo apt-get updatethis will not work very well, still a good time saver when setting up a new system :) – GM-Script-Writer-62850 Apr 30 '13 at 1:54/var/cache/apt/archivesto the second one made it only download ~250Mb. Still, you need a connection to run the install. – Maxime R. Nov 2 '13 at 18:16apt-get updateis not needed if you copy/var/lib/apt/lists- this directory contains the repository information that is downloaded byapt-get update. – ignis Mar 19 '14 at 21:21.debover to myusbfrom/var/cache/apt/archives. On the other computer I merely opened the usb drive and double clicked the.debwhich launched the Ubuntu GUISoftware Updater. Easy pezy. – Jacksonkr 10 hours ago