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

Re: cleaning up my local apt repository



Roman Stöckl-Schmidt wrote:
Hi guys and gals,
I've been meaning to ask this for quite some time, here it goes:

I've got a cache of downloaded .debs in
/usr/local/cache/dists/local/local/binary-i386/ so I can update the
packages on my other machines and only having to download them once. I'm
doing this because I only have a single ISDN (64 kbps) connection and I
simply don't have the time.
~From that cache I generate a Packages file with dpkg-scanpackages and
can then just add "deb file:/usr/local/cache local local" or similar to
the sources.list

Now I've been maintaing that cache for about 6 months or so now and I'd
like to sort out the old packages because there are quite a few
duplicates in there. So I want to do something similar to apt-get
autoclean for that directory only with the difference that I want to
keep only the most recent version of a package even if that "most recent
version" isn't available from the debian repositories anymore.

You are going about this the hard way.  Use apt-proxy.  It is in Woody
(the old version) and Sid (the new version).  It allows you to specify
which repositories you want to use, how many different versions of a
package to maintain, how often to sweep for clean up, the maximum size
of your repository and a number of other options.  All you do is to
have one machin run apt-proxy and then point your other machines to the
proxy instead of the regular repository.  It functions like any other
proxy.  If the file is locally available it provides it, otherwise it
fetches it from the repository.  In my case I have even pointed the
proxy machine back at itself (i.e., my sources.list on the proxy machine
points to localhost).  Once the first machine is update, the others a
very fast.

-Roberto

--
Roberto C. Sanchez
http://familiasanchez.net/~sanchezr

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: