cleaning up my local apt repository
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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.
How would I do that?
dpkg-scanpackages generates notifications like
| ! Package $packagename (filename $newpackageversionpath) is repeat but
newer version;
| used that one and ignored data from $oldpackageversionpath !
and
| ! Package $packagename (filename $oldpackageversionpath) is repeat;
| ignored that one and using data from $newpackageversionpath !
so it should not be to hard to write a shellscript that does rm
$oldpackageversionpacth but I'm just not experienced enough to do
without any assistance.
Any suggestions would be greatly appreciated.
Cheers, Roman.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCQaFCn0kyIx7rF68RAix3AJ41LUGFtuZKYWXnEl6XMjsTcxXq0QCfYvSJ
mfNAEn8rWBQ38haiKM7voZ8=
=d9X0
-----END PGP SIGNATURE-----
Reply to: