Gentoo Archives: gentoo-user

From: Zac Medico <zmedico@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] pruning /usr/portage/distfiles/
Date: Thu, 21 Jul 2005 17:43:06
Message-Id: 42DFDC74.4060000@gmail.com
In Reply to: [gentoo-user] pruning /usr/portage/distfiles/ by James
1 James wrote:
2 > Hello,
3 >
4 > /usr is the only partion I seem to have trouble filling up. After
5 > poking around I've decided to 'prune' /usr/portage/distfiles.
6 >
7 > Before automating this action, via crontab, I'm soliciting
8 > any other, slicker/cooler/better method to auto prune
9 > /usr/portage/distfiles.
10 >
11 > What I have done manually is:
12 > EMOVING LARGE FILES IN /usr/protage/distfiles:
13 > find ./ -size +100000 -exec ls -lag {} \; | less
14 > <lists large files>
15 > find ./ -size +100000 -print -exec rm {} \;
16 > <prints & removes large files>
17 > again:
18 > find ./ -size +50000 -exec ls -lag {} \; | less
19 > find ./ -size +50000 -print -exec rm {} \;
20 > again:
21 > find ./ -size +20000 -exec ls -lag {} \; | less
22 > find ./ -size +20000 -print -exec rm {} \;
23 >
24 > REMOVING OLD FILES IN /usr/protage/distfiles:
25 > find ./ -mtime +180 -exec ls -lag {} \; | less
26 > find ./ -mtime +180 -print -exec rm {} \;
27 >
28 > Running these commands manually caused the
29 > /usr/ dir to reduce from 88% full to 55% full.
30 >
31 > Looking at the proposed lists of files to be removed, gave
32 > me some confidence that it was OK to remove the files.
33 > Suggestions as to better logic that I could integrate
34 > into a script is welcome.
35 >
36 > Before hacking these commands into a script, I'd be interested
37 > in comments and ideas....(a better mouse trap?) better logic,
38 > like progressively running the commands unti the disk space
39 > threshold is below 60% full or something.
40 >
41 >
42 > James
43 >
44
45 See the make.conf(5) manpage for variables that adjust portage file locations. You can use DISTDIR to change the file download directory.
46
47 There's something called distcleanr but I haven't tried it: http://www.leak.com.ar/~juan/code/distcleaner/
48
49 Zac
50 --
51 gentoo-user@g.o mailing list