public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user]  pruning /usr/portage/distfiles/
@ 2005-07-21 16:22 James
  2005-07-21 16:31 ` David Morgan
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: James @ 2005-07-21 16:22 UTC (permalink / raw
  To: gentoo-user

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

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user]  pruning /usr/portage/distfiles/
  2005-07-21 16:22 [gentoo-user] pruning /usr/portage/distfiles/ James
@ 2005-07-21 16:31 ` David Morgan
  2005-07-21 17:30   ` [gentoo-user] " James
  2005-07-21 16:43 ` [gentoo-user] " Rumen Yotov
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: David Morgan @ 2005-07-21 16:31 UTC (permalink / raw
  To: gentoo-user

On 16:22 Thu 21 Jul     , 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.
<snip>

I use tmpwatch to do this - it deletes files that haven't been accessed
for a certain amount of time (but only in directories specified by you).

It's in portage, and comes with a default config file that's pretty good
if you just uncomment a few lines, and includes an entry for distfiles,
so you don't have to do much to set it up.

If you search forums.gentoo.org you'll probably find various scripts for
removing source for older versions of packages, some of which are quite
sophisticated.

I prefer the tmpwatch route but others prefer the other approach.

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user]  pruning /usr/portage/distfiles/
  2005-07-21 16:22 [gentoo-user] pruning /usr/portage/distfiles/ James
  2005-07-21 16:31 ` David Morgan
@ 2005-07-21 16:43 ` Rumen Yotov
  2005-07-21 17:29   ` [gentoo-user] " James
  2005-07-21 17:33 ` [gentoo-user] " Zac Medico
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Rumen Yotov @ 2005-07-21 16:43 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1764 bytes --]

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
>
>  
>
Hi,
Going by memory here, but think it's correct ;)
Check about FEATURES="... distclean ..." in your /etc/make.conf, IMHO 
this is a FEATURE which allows you to clean/erase the source files after 
an emerge.
Or use /var to hold your portage-tree (make.conf&ln -s /usr/portage 
/var/portage ;) (i'm using this setup).
HTH. Rumen

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3397 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-user]  Re: pruning /usr/portage/distfiles/
  2005-07-21 16:43 ` [gentoo-user] " Rumen Yotov
@ 2005-07-21 17:29   ` James
  0 siblings, 0 replies; 9+ messages in thread
From: James @ 2005-07-21 17:29 UTC (permalink / raw
  To: gentoo-user

Rumen Yotov <rumen_yotov <at> dir.bg> writes:


> Going by memory here, but think it's correct ;)
> Check about FEATURES="... distclean ..." in your /etc/make.conf, IMHO 
> this is a FEATURE which allows you to clean/erase the source files after 
> an emerge.
> Or use /var to hold your portage-tree (make.conf&ln -s /usr/portage 
> /var/portage ;) (i'm using this setup).

OK, I'm not using this option. I'll read up on it and test it and see
if I like how it works....

thx,

James


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-user]  Re: pruning /usr/portage/distfiles/
  2005-07-21 16:31 ` David Morgan
@ 2005-07-21 17:30   ` James
  0 siblings, 0 replies; 9+ messages in thread
From: James @ 2005-07-21 17:30 UTC (permalink / raw
  To: gentoo-user

David Morgan <david.morgan <at> wadham.oxford.ac.uk> writes:


> > /usr/portage/distfiles.

> I use tmpwatch to do this - it deletes files that haven't been accessed
> for a certain amount of time (but only in directories specified by you).

> I prefer the tmpwatch route but others prefer the other approach.


OK, I'll check out tmpwatch and see how it works...

thx,

James




-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user]  pruning /usr/portage/distfiles/
  2005-07-21 16:22 [gentoo-user] pruning /usr/portage/distfiles/ James
  2005-07-21 16:31 ` David Morgan
  2005-07-21 16:43 ` [gentoo-user] " Rumen Yotov
@ 2005-07-21 17:33 ` Zac Medico
  2005-07-21 21:33 ` Andreas Prieß
  2005-07-21 21:59 ` Octavio Ruiz (Ta^3)
  4 siblings, 0 replies; 9+ messages in thread
From: Zac Medico @ 2005-07-21 17:33 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user]  pruning /usr/portage/distfiles/
  2005-07-21 16:22 [gentoo-user] pruning /usr/portage/distfiles/ James
                   ` (2 preceding siblings ...)
  2005-07-21 17:33 ` [gentoo-user] " Zac Medico
@ 2005-07-21 21:33 ` Andreas Prieß
  2005-07-21 21:59 ` Octavio Ruiz (Ta^3)
  4 siblings, 0 replies; 9+ messages in thread
From: Andreas Prieß @ 2005-07-21 21:33 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1164 bytes --]

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.

There is a nice little script to remove all outdated distfiles, that is
all files that do not belong to any installed package. It has been
recommended on this list before and for me it works really great:

Just look at
http://evvl.rustedhalo.net/software/gentoo/
and the script distclean.

distclean v0.3

Usage: distclean [-h,--help] [-d,--delete] [-p,--pretend] [-m,--move dir]
                 [-q ,--quiet] --nospinner

        --help (-h short option)
                Shows this help screeen.

        --delete (-d short option)
                Deletes the outdated file(s) in the distfiles directory.

        --pretend (-p short option)
                Lists the outdated file(s) in the distfiles directory.

        --move dir (-m dir short option)
                Move the outdated file(s) to the given directory.

        --quiet (-q short option)
                Just list the outdated files, no extra junk.

        --nospinner
                Turns off the cute little spinner.


-- 

Andreas

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user]  pruning /usr/portage/distfiles/
  2005-07-21 16:22 [gentoo-user] pruning /usr/portage/distfiles/ James
                   ` (3 preceding siblings ...)
  2005-07-21 21:33 ` Andreas Prieß
@ 2005-07-21 21:59 ` Octavio Ruiz (Ta^3)
  2005-07-22 17:24   ` [gentoo-user] " James
  4 siblings, 1 reply; 9+ messages in thread
From: Octavio Ruiz (Ta^3) @ 2005-07-21 21:59 UTC (permalink / raw
  To: gentoo-user

James, who happens to be smarter than you, thinks:
> 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.

You can try yacleaner

http://gentoo.org.mx/yacleaner/


$ ./yacleaner-0.4.2alpha

Usage:
    yacleaner-0.4.2alpha [ options ] [ action ] < dist | binpkg | worktmp | log | all >
    yacleaner-0.4.2alpha --help

        Options: [ --ask | --nocolor | --pretend | --verbose ]

        Actions:  [ --delete ] [ --move=<dir> ]


            For more help try 'yacleaner-0.4.2alpha --help'

The lastest stable version is 0.3

-- 
Chaste makes waste.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-user]  Re: pruning /usr/portage/distfiles/
  2005-07-21 21:59 ` Octavio Ruiz (Ta^3)
@ 2005-07-22 17:24   ` James
  0 siblings, 0 replies; 9+ messages in thread
From: James @ 2005-07-22 17:24 UTC (permalink / raw
  To: gentoo-user

Octavio Ruiz (Ta^3 <tacvbo <at> tacvbo.net> writes:


> You can try yacleaner
> 
> http://gentoo.org.mx/yacleaner/

Wow!  

Thanks to everyone, for all of the neat ideas/scripts to keep
the distfiles minimized.........

//
James


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-07-22 17:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-21 16:22 [gentoo-user] pruning /usr/portage/distfiles/ James
2005-07-21 16:31 ` David Morgan
2005-07-21 17:30   ` [gentoo-user] " James
2005-07-21 16:43 ` [gentoo-user] " Rumen Yotov
2005-07-21 17:29   ` [gentoo-user] " James
2005-07-21 17:33 ` [gentoo-user] " Zac Medico
2005-07-21 21:33 ` Andreas Prieß
2005-07-21 21:59 ` Octavio Ruiz (Ta^3)
2005-07-22 17:24   ` [gentoo-user] " James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox