I frequently reinstall Ubuntu from scratch, so I’ve set up
apt-cacher on my
fileserver to cache the packages I install - this not only reduces my impact
on the mirrors, but also speeds up my installs.
Occasionally, though, I see strange problems during installs:
retrying the download of an apparently-cached package. I haven’t figured out
what’s wrong, and frequently I just want to get the reinstall going again. In
these situations, it seems optimal to just dump the cache and start over; I
haven’t found clear documentation of how to do this, but in case it isn’t
obvious, this works for me (my cache is in
/var/cache/apt-cacher, and I run
it as www-data):
Update: I found this blog post helpful for manually removing troublesome packages from the cache.