The copy-on-write basis on with cowbuilder works is handy for
building packages in a clean environment, but cowbuilder, like pbuilder,
will leave you with an ever-growing pile of packages in
/var/cache/pbuilder/aptcache
.
This is particularly a problem if you have a sid chroot
as the rate of package turnover is quite high.
There are a number of ways of combatting this:
pbuilder --clean
will delete all of the downloaded .debs for you. If bandwidth is a problem for you then you might like something that is more like apt'sautoclean
rather thanclean
.- pbuilder config: if you have a
sources.list
on the host machine that includes the sources you use in the chroot (with appropriate pinning!), then you can pointAPTCACHE
in your~/.pbuilderrc
to your system apt cache and then use the regularaptitude autoclean
command to clean both caches at once. - You can also hijack apt to do the work for you directly on the
pbuilder apt cache, but be aware that
if you have several chroots (etch, lenny, squeeze, sid, ...), then
this situation may not be ideal as you will clean the cache of
all packages that aren't matched by the chroot you use for cleaning:
mkdir /var/cache/pbuilder/aptcache/partial apt-get -o Dir::Cache::archives=/var/cache/pbuilder/aptcache/ -o Dir=/var/cache/pbuilder/base.cow/ autoclean
(the mkdir should only need to be done once)
Last edited: Saturday April 25, 2009
Copyright © 1996-2014 Stuart Prescott