James wrote:
Hello,
/usr is the only partion I seem to have trouble filling up. After
poking around I've decided to 'prune' /usr/portage/distfiles.
Before automating this action, via crontab, I'm soliciting
any other, slicker/cooler/better method to auto prune
/usr/portage/distfiles.
What I have done manually is:
EMOVING LARGE FILES IN /usr/protage/distfiles:
find ./ -size +100000 -exec ls -lag {} \; | less
<lists large files>
find ./ -size +100000 -print -exec rm {} \;
<prints & removes large files>
again:
find ./ -size +50000 -exec ls -lag {} \; | less
find ./ -size +50000 -print -exec rm {} \;
again:
find ./ -size +20000 -exec ls -lag {} \; | less
find ./ -size +20000 -print -exec rm {} \;
REMOVING OLD FILES IN /usr/protage/distfiles:
find ./ -mtime +180 -exec ls -lag {} \; | less
find ./ -mtime +180 -print -exec rm {} \;
Running these commands manually caused the
/usr/ dir to reduce from 88% full to 55% full.
Looking at the proposed lists of files to be removed, gave
me some confidence that it was OK to remove the files.
Suggestions as to better logic that I could integrate
into a script is welcome.
Before hacking these commands into a script, I'd be interested
in comments and ideas....(a better mouse trap?) better logic,
like progressively running the commands unti the disk space
threshold is below 60% full or something.
James
See the make.conf(5) manpage for variables that adjust portage file locations.
You can use DISTDIR to change the file download directory.
There's something called distcleanr but I haven't tried it:
http://www.leak.com.ar/~juan/code/distcleaner/
Zac
--
gentoo-user@gentoo.org mailing list