Doesn't this do what you need? http://www.unix-ag.uni-kl.de/~bloch/acng/html/maint.html#cleanup :
Validate by file name AND file contents (through checksum) Checking file contents where possible, also attempt to detect incorrect file size information in the cached metadata. Note: the check results are stored only once, future calls without this option can overwrite the results again. Use action buttons (see below) to delete corrupted files after the scan. Force the download of index files Sometimes it may be needed to redownload all index files, explicitly replacing the cached versions. This flag enables this behaviour. Purge unreferenced files after scan Avoid the use of the orphan list and delete files instead. This option is dangerous and should not be used unless when absolutely no mistakes/problems can happen. Instead, it's possible to view the orphan list later and delete then (see below).Regards, Eduard. ----- Ursprüngliche Nachricht ----- Von: Konrad Zimmermann Gesendet: 11.10.11 08:46 Uhr An: Debian Bug Tracking System Betreff: Bug#644959: apt-cacher-ng: corrupted files linger in cache Package: apt-cacher-ng Version: 0.6.7-1 Severity: important >From time to time apt-cacher-ng downloads corrupted files either because the version on the server is or because it gets garbled during transmission. These files then stay in the cache and apt (or aptitiude in my case) complains about wrong hash sums on upgrades. After manually deleting the file from cache, apt-cacher-ng reloads it and upgrades can proceed. -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 3.0.1-01 (SMP w/4 CPU cores; PREEMPT) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages apt-cacher-ng depends on: ii adduser 3.113 ii debconf [debconf-2.0] 1.5.40 ii libbz2-1.0 1.0.5-7 ii libc6 2.13-21 ii libgcc1 1:4.6.1-4 ii liblzma2 5.1.1alpha+20110809-2 ii libstdc++6 4.6.1-4 ii zlib1g 1:1.2.3.4.dfsg-3 Versions of packages apt-cacher-ng recommends: ii ed 1.5-3 ii perl 5.12.4-4 Versions of packages apt-cacher-ng suggests: ii doc-base <none> ii libfuse2 2.8.6-1 -- Configuration Files: /etc/apt-cacher-ng/security.conf [Errno 13] Keine Berechtigung: u'/etc/apt-cacher-ng/security.conf' -- debconf information: apt-cacher-ng/gentargetmode: No automated setup -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

