Two different approaches exist:

  • Manually copy a complete online repository to a USB keydrive and set it up as a package source for your machines.
  • Use apt-medium to have the apt tools use a shared cache location (e.g. /var/cache/apt on a removable media, or network share).

Setting up a local repository


As you can see in the page Repositories/Ubuntu, the Ubuntu software repository is organized into four "components", on the basis of the level of support Ubuntu can offer them, and whether or not they comply with Ubuntu's Free Software Philosophy. The components are called Main (officially supported software), Restricted (supported software that is not available under a completely free license), Universe (community-maintained, i.e. not officially supported software) and Multiverse (software that is "not free"). The standard Ubuntu installation is a subset of software available from the main and restricted components.

Download the online repository

You can download the packages in a USB keydrive in a computer with Internet connection and store them in your Ubuntu computer.

Go to this web address and then to the SuiteCodename of the Ubuntu installed in your hard disk (intrepid, jaunty, karmic, ...) and download the files :

  • Release
  • Release.gpg
  • And the Contents files for your architecture (i.e Contents-i386.gz ,if you architecture is i386).

Later, go to the component (main, multiverse, restricted, universe) and architecture (i.e. binary-i386/ in /dists/karmic/main/) that you want in your local repository, and download the files:

  • Packages.bz2
  • Packages.gz
  • Release

Optionally, you can download the same files for the source directory (its packages are architecture independent).

Now, you have to store the files in your local Ubuntu repository in the same order. For example:

  • In /home/repository/dists/karmic you would have the files: Contents-i386.gz , Release and Release.gpg
  • And in /home/repository/dists/karmic/main/binary-i386 the files: Packages.bz2 , Packages.gz and Release

Add the local repository in your sources list

Use Applications -> Add/Remove as explained in Repositories/Ubuntu to add the offline repository, stored in the /home/repository directory :

deb file:///home/repository SuiteCodename main restricted universe multiverse 


  • SuiteCodename is intrepid, jaunty, karmic ...

  • You can include some or all the components ( main, multiverse, restricted, universe).

See also

CategoryOffline CategoryPackageManagement

AptGet/Offline/Repository (last edited 2011-03-16 13:03:32 by 77-20-48-211-dynip)