Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/usr/portage 6.8GB - Is this right?
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
jlincoln
n00b
n00b


Joined: 01 Dec 2004
Posts: 11

PostPosted: Tue Jan 29, 2008 4:27 pm    Post subject: /usr/portage 6.8GB - Is this right? Reply with quote

My disk space is getting low and while determining what is taking up the space I found that /usr/portage is taking up 6.8GB. Is this right? I only have a 36GB disk. So this is a significant chunk.

I used the du -khs command on /usr/portage to get the size of the directory.

Thanks,
Jason
Back to top
View user's profile Send private message
jlincoln
n00b
n00b


Joined: 01 Dec 2004
Posts: 11

PostPosted: Tue Jan 29, 2008 4:33 pm    Post subject: /usr/portage 6.8GB - Is this right? Reply with quote

I see that 6.2GB is in /usr/portage/distfiles. Is this necessary? Is there a way to clean up this directory?

Thanks,
Jason
Back to top
View user's profile Send private message
gentoo_ram
Guru
Guru


Joined: 25 Oct 2007
Posts: 369
Location: San Diego, California USA

PostPosted: Tue Jan 29, 2008 4:36 pm    Post subject: Reply with quote

The directory you may clear is /usr/portage/distfiles. This is the directory where all package downloads go before they are built. If you clear /usr/portage/distfiles, then you may have to download packages again as they are updated, but otherwise your system will be fine. Don't delete anything else in the /usr/portage tree.

Also, check /var/tmp/portage. This directory is used when building packages but may not get cleaned out if there is an error. As long as you aren't current emerging any packages, /var/tmp/portage can be cleared as well.
Back to top
View user's profile Send private message
erikm
l33t
l33t


Joined: 08 Feb 2005
Posts: 620

PostPosted: Tue Jan 29, 2008 4:37 pm    Post subject: Re: /usr/portage 6.8GB - Is this right? Reply with quote

jlincoln wrote:
I see that 6.2GB is in /usr/portage/distfiles. Is this necessary? Is there a way to clean up this directory?

Thanks,
Jason

This directory contains the source tarballs for your Gentoo ebuilds. If you do not wish to keep them, just do 'rm -rf /usr/portage/distfiles/*' as root. You may want to think twice about it if you're on a 56k modem, otherwise just go ahead; source tarballs tend to get outdated quickly anyways.

EDIT: Fixed typo in path.


Last edited by erikm on Tue Jan 29, 2008 5:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
psomas
Developer
Developer


Joined: 23 Sep 2006
Posts: 212
Location: Greece

PostPosted: Tue Jan 29, 2008 4:37 pm    Post subject: Re: /usr/portage 6.8GB - Is this right? Reply with quote

jlincoln wrote:
I see that 6.2GB is in /usr/portage/distfiles. Is this necessary? Is there a way to clean up this directory?

Thanks,
Jason

you could use eclean-dist,which is part of gentoolkit, to clenaup distfiles from old sources...
however, 6.2GB seams reasonble...

portage keeps there the sources for packages installed in your system, so in case of recompilation you don't have to fetch them again...
_________________
myblog
FOSS NTUA Community
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 3714
Location: india

PostPosted: Tue Jan 29, 2008 4:44 pm    Post subject: Reply with quote

i used 10gb for /usr portage including.
a seperate 3.5 gb for distfiles.
as we install more and more packages /usr gets filled up. and so is distfiles.
now that i find only 40 mb of space available in distfiles partition i have to run eclean distfiles for every update.still i get about 100 mb only free. it can get worse.
if i had partition space available i would make 15 gb for /usr including portage and distfiles. :(
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
8086
n00b
n00b


Joined: 12 Dec 2007
Posts: 52

PostPosted: Tue Jan 29, 2008 5:15 pm    Post subject: Reply with quote

6.8 GB seems reasonable?? I have a 3 GB /usr partition.

Alas erikm suggested "rm -rf /usr/portage/disfiles/*" as root. Make sure you spot that * at the end of the command. I don't know if portage will create /usr/portage/distfiles if it doesn't exist.
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 3714
Location: india

PostPosted: Tue Jan 29, 2008 5:37 pm    Post subject: Reply with quote

you can delete entire portage if it brcomes corrupted next --sync will create portage and distfiles.
but if oyu have low bandwidth connection to internet it is not wise to delete the distfiles.
many times it becomes necessary to downgrade some of the packages then you have to download many a files again.
if hdd spacce is premium then keep the distfiles copy in a dvd cd or another comp. it will come handy.
a single partition install of gentoo on the average takes about 8 gb if you store your data elsewhere.
those who have high number gb hdd must provide 20-30 gb for gentoo.then no worry of running short of space at critical times.
the magic word is net connection speed.[for distfiles.] :)
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
jlincoln
n00b
n00b


Joined: 01 Dec 2004
Posts: 11

PostPosted: Tue Jan 29, 2008 5:45 pm    Post subject: Reply with quote

Thank you all. I got rid of the files in /usr/portage/distfiles. I need the space! This is good to know. I am sure it will grow as I emerge in the future.

Thanks again,
Jason
Back to top
View user's profile Send private message
MostAwesomeDude
Guru
Guru


Joined: 12 Aug 2007
Posts: 373

PostPosted: Tue Jan 29, 2008 7:19 pm    Post subject: Reply with quote

Protip: Use "-d" to delete all unused distfiles; without it, eclean will try to keep distfiles it thinks you may want in the future.
Code:
# eclean-dist -d

_________________
Don't believe the "n00b" under my name.
Back to top
View user's profile Send private message
psomas
Developer
Developer


Joined: 23 Sep 2006
Posts: 212
Location: Greece

PostPosted: Wed Jan 30, 2008 12:06 am    Post subject: Reply with quote

some nice examples from the man page:
Quote:
Clean all distfiles except for installed packages (exact version), those which are less than one month old, bigger than 50MB, or fetch-restricted:
# eclean-dist -d -t1m -s50M -f

From a crontab, silently clean packages in the safest mode, and then distfiles in destructive mode but protecting files less than a week old, every sunday at 1am
0 1 * * sun eclean -C -q packages ; eclean -C -q -d -t1w distfiles


Quote:
The Gentoo forum thread that gave birth to eclean:
http://forums.gentoo.org/viewtopic.php?t=3011

The bug report requesting eclean inclusion in gentoolkit:
http://bugs.gentoo.org/show_bug.cgi?id=33877

_________________
myblog
FOSS NTUA Community
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