On my Debian6 I have apt-cacher installed and running correctly.

Every day the current task is run **/etc/cron.daily/apt-cacher: #!/bin/sh

# Only do anything if apt-cacher is actually installed
if [ ! -x /usr/share/apt-cacher/apt-cacher.pl ]; then
  exit 0

# Run the report generator

# Run the cache cleaner
# Add -v to get an email showing what the script has done
# Add -p to use the experimental pdiff code
/usr/share/apt-cacher/apt-cacher-cleanup.pl -f

The script apt-cacher-cleanup.pl is taking more than 1 hour to complete and while it's running, other it looks like other machines are pending (kind of frozen).

I used the arg "-v" to receive an email, and everything looks fine. I can see at the end of the email: Found 134105 valid file entries

1) Is it normal that the cleanup scrit is taking that much time?

2) What is "134105 valid file entries"? I only have 1297 files in my cache folder.

3) Should I delete the cache folder, so it will re-download only the necessary packages?


** EDIT There is no 134105 packages. I'm not sure why I have this number on this email. In the folder /var/cache/apt_cacher/packages, I have 1297, which seems to be more reasonable.

** EDIT2 Sometime apt-cacher-cleanup.pl is taking only 10min and no frozen machines.

  • Can't you simply use apt-get clean ? – shodanshok Aug 3 '15 at 9:33
  • In my understanding, "apt-get clean" will clean packages used by the machine, but it won't affect cache packages by apt-cacher. – dalf Aug 5 '15 at 3:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.