Diary of a geek

April 2008
Mon Tue Wed Thu Fri Sat Sun
 
22
       

My ugly mug

Where's Andrew?

Categories

Other people's blogs

Subscribe

RSS feed

Contact me

JavaScript required


Tuesday, 22 April 2008

On keeping /var/cache/apt/archives empty

Steven Hanley was pondering how to keep /var/cache/apt/archives empty on the mirror that I help administer.

This sounds vaguely similar to mounting the /usr filesystem read-write at the start of an APT run and read-only again at the end. (A practice I used to believe in, but due to various package upgrades making /usr busy for no good reason, and it artificially inflating the maximal mount-count and prematurely causing a fsck at boot, I've discontinued)

So, putting

DPkg::Post-Invoke { "apt-get clean"; };

in /etc/apt/apt.conf (or in a file in /etc/apt/apt.conf.d) ought to do the trick.

[22:05] [debian] [permalink]