Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Limiting the DISTDIR size
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Habbit
Apprentice
Apprentice


Joined: 01 Sep 2007
Posts: 237
Location: 3.7137 W, 40.3873 N

PostPosted: Sun Jun 15, 2008 3:42 pm    Post subject: Limiting the DISTDIR size Reply with quote

Hello there. I have an oldish box in which disk space is quite much _the_ most valuable asset, even over RAM. I have found that /usr/portage takes up over 1GiB, 800MiB of which are in the /usr/portage/distfiles directory, which is DISTDIR, or the directory where source tarballs are saved to. I investigated the issue in depth and found that it contains sources for all packages I ever installed, including packages that have since been unmerged or replaced by more recent versions. Is there any way to make Portage automatically remove old sources from DISTDIR in order to keep it down to a more manageable size without having to periodically go there myself and wreak havoc with rm?
_________________
Code:
~ $ objdump -d ./habbit_mind
90      xchg %rax, %rax
EB FD   jmp $-3
Back to top
View user's profile Send private message
jfp
Guru
Guru


Joined: 08 Jul 2007
Posts: 326
Location: Virginia, USA

PostPosted: Sun Jun 15, 2008 4:11 pm    Post subject: Reply with quote

Habbit,
The answer is:
Code:

eclean-dist

Code:

zippy linux # equery belongs eclean-dist
[ Searching for file(s) eclean-dist in *... ]
app-portage/gentoolkit-0.2.3-r1 (/usr/bin/eclean-dist -> eclean)

_________________
jfp
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Jun 15, 2008 4:16 pm    Post subject: Reply with quote

You could delete all of /usr/portage/distfiles after updating world. New sources will be downloaded if they are needed next time you update.

You could also save space by deleting all of /usr/src after you are done compiling the kernel and any external modules (nvidia, etc.)

Habbit wrote:
I have an oldish box in which disk space is quite much _the_ most valuable asset, even over RAM.

Is disk space more valuable than bandwidth too ?
If the answer is no, then disregard the above suggestions.


Last edited by cyrillic on Sun Jun 15, 2008 4:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54212
Location: 56N 3W

PostPosted: Sun Jun 15, 2008 4:16 pm    Post subject: Reply with quote

Habbit,

There are several solutions.

1. The are scripts posted on the forums that do what you want, often with the word "cruft" in their names. I'm not sure if there is a gentoo one or not.

2. If you have another gentoo system, you may use NFS to share one portage tree for all your systems, that includes distfiles.
Be sure to keep /usr/portage/packages separate for different CFLAGS settings.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Habbit
Apprentice
Apprentice


Joined: 01 Sep 2007
Posts: 237
Location: 3.7137 W, 40.3873 N

PostPosted: Sun Jun 15, 2008 4:20 pm    Post subject: Reply with quote

Wow, anwer overload :D Thank you all guys, I'll test some of them and will be back here soon to report.
_________________
Code:
~ $ objdump -d ./habbit_mind
90      xchg %rax, %rax
EB FD   jmp $-3
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum