[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt: how to avoid double downloads ?



Peter L. Schroeder said:
> What is a useful configuration in apt.conf and/or anywhere else
> to avoid downloading packages twice if I run
> apt-get first on one and then on the other box ?

Although it may not be the most correct way of doing it, here's what I did:

1)  Have one machine share /var/cache/apt via NFS.  NFS-mount it as the other
machine's /var/cache/apt.  They're now sharing a local package cache.

2)  After having dselect install packages, tell it not to delete the
downloaded packages.  (If you're using apt-get directly, just don't call
apt-get clean.)

I still have to download lists of available packages separately for each
machine, but that's pretty trivial, IMO.

When I go to install a package, it first looks in /var/cache/apt to see if
the package is already there, so it only gets downloaded by the first machine
to install it and the others grab the local copy.  (Unless a new version has
become available, of course.)


Reply to: