You can store an online repository in a USB keydrive or other local storage, to use it offline.
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 http://archive.ubuntu.com/ubuntu/dists/ and then to the SuiteCodename of the Ubuntu installed in your hard disk (intrepid, jaunty, karmic, ...) and download the files :
- 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:
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).