Can I create a LAN repository

If I’m installing Ubuntu on multiple networked PC’s, is there any way I can download packages and updates to just one machine and get the rest to check its cache for needed files before going online to get the same files… seems a bit wasteful in both storage and time for multiple machines to each have copies of the same packages in their /var/cache/apt/archives/ directories.

ie. can one machine (or NAS) be used as a repository that gets checked for packages by ALL machines first, but if they aren’t there… then they go online to a normal repo for them.

Or put another way… Can ALL machines “share” a /var/cache/apt/archives/ directory.
(and if so, what about the lock file)

I know I could “manually” copy the files to the other machines (leaving the lock file), but it would be nice if it was an automatic process.

This could potentially save hours, particularly during an upgrade.

You certainly can!

apt-get install apt-proxy

Make sure the following settings are appropriate in /etc/apt-proxy/apt-proxy-v2.conf ;

;; Server IP to listen on address =

;; Server port to listen on
port = 9999

;; Ubuntu archive
backends = Index of /ubuntu
min_refresh_delay = 15m

Then edit your /etc/apt/sources.list and change the format from;

deb karmic main restricted
deb http://:9999/ubuntu/ karmic main restricted

For each line … then do apt-get update, and you’re away!

Right, I thought there would be a way… Thanks for that. :slight_smile: