when i noticed that my /usr partition was filling up rather quickly, i got to thinking: Even redhat didnt use up that much space...

So i sniffed around, then I found the directory /usr/portage/distfiles full with OVER 1Gb OF FILES!!!

so, quickly that was out of there! and i had found another Gb of space!

All the files in there are the files that portage has downloaded, but it doesnt get rid of it after you compiled in case you want to do it again, it will pluck it out of /usr/portage/distfiles instead of downloading it again.

/var/tmp/portage also gets filled up if you abort ebuilds. I killed a mozilla build and it left 14M worth of stuff in that dir alone!

puddpunk wrote:

when i noticed that my /usr partition was filling up rather quickly, i got to thinking: Even redhat didnt use up that much space...

So i sniffed around, then I found the directory /usr/portage/distfiles full with OVER 1Gb OF FILES!!!

so, quickly that was out of there! and i had found another Gb of space!

All the files in there are the files that portage has downloaded, but it doesnt get rid of it after you compiled in case you want to do it again, it will pluck it out of /usr/portage/distfiles instead of downloading it again.

so, quickly that was out of there! and i had found another Gb of space!

Though not critical, doing this does require you to download the stuff again if you reinstall it.
I emerge using -b so I have the binaries available. If I run out of diskspace, I'll just start backing
up that directory to a CD.

Also... 1G is definately more than 100Mb+ (as suggested in the post title). I was expecting to
find something freeing up 100M or so _________________Will today be the day rights are taken from The People?

when i noticed that my /usr partition was filling up rather quickly, i got to thinking: Even redhat didnt use up that much space...

So i sniffed around, then I found the directory /usr/portage/distfiles full with OVER 1Gb OF FILES!!!

so, quickly that was out of there! and i had found another Gb of space!

All the files in there are the files that portage has downloaded, but it doesnt get rid of it after you compiled in case you want to do it again, it will pluck it out of /usr/portage/distfiles instead of downloading it again.

Anybody else have some space-saving tips?

Did you just del , the zipped source or blow away the dir and create a new one?????

when i noticed that my /usr partition was filling up rather quickly, i got to thinking: Even redhat didnt use up that much space...

So i sniffed around, then I found the directory /usr/portage/distfiles full with OVER 1Gb OF FILES!!!

so, quickly that was out of there! and i had found another Gb of space!

All the files in there are the files that portage has downloaded, but it doesnt get rid of it after you compiled in case you want to do it again, it will pluck it out of /usr/portage/distfiles instead of downloading it again.

Anybody else have some space-saving tips?

Did you just del , the zipped source or blow away the dir and create a new one?????

Cheers
Dale.

FYI, blow away the directory works for me, no problem encountered so far.

Code:

rm /usr/portage/distfiles/* && rm -r /var/tmp/portage/*

Of course, you'd like to backup some 'unemergable' files like realplayer's rpm and sun-jdks, which required you to download manually.

I have once thought about writing a script that would check the size of the distfiles directory, and if it found it was too big, deleting the files which were accessed the longest time ago, until the directory wasn't too big anymore.

This way, most of the files deleted will be the sources of packages who have totally new versions, not just new -r number.

Since i am currently installing Gentoo on a pc with a 4GB HD, i will probably write this script one of the next days, and post it here.

I had the same problem of download the same source tarball at least 3 times. (3 gentoo boxes, live on the net)

Solution: Built another box, slapped it on the internal network and copy /usr/portage and nfs mount the partition.

There. I now have 1 computer keeping all the source tarballs (I WANT to keep them) and 3 computers to share them.

Why delete /usr/portage/distfiles especially when you have more than one box. When building new boxes, during the install, I just emerge portmap and run it, and move /usr/portage somewhere else, mount the drive and create the symlink needed to point to the right area on my nfs server (which is gentoo.. and has a TON of HD space)_________________cat5@catfive.org

If you keep your distfiles for a very long time, you will have tarballs of old packages. If you use the script i wrote, it will delete the least used packages, which presumably will be the ones that aren't used anymore. This needs a correct setting of the maxsize var for your enviroment, so it keeps all needed, but deletes unneeded.

# filtering of incorrect version-cuts (note that .gz and .bz2 should have
# been cut of by the above command to cut of the version nrs)
# add any u like to keep eg multiple versions of let's say freetype
# or remove the packages from Xfree (Xsrc-1 -2 & -3 who gets
# cut incorrect)
# eg: LISTING=$(filter "$LISTING" "freetype")
# Note: Filtering is case-insensitive and regexp-ready

Posted: Wed Aug 28, 2002 7:04 pm Post subject: Can you cross-reference to the versions that are still valid

FreeBSD has a similar issue with /usr/ports/distfiles, but they supply a utility (/usr/ports/Tools/scripts/distclean.sh) that will remove any distfiles that are no longer referenced by any ports. This is typically used to get rid of old versions, since ports doesn't support multiple versions like emerge does.

Maybe a good alternative for gentoo would be to remove if it's not currently installed? Or perhaps if it's more than X versions behind what's considered current.

Of course, if you don't care about nuking something you might have do eventually download, the scripts that have been presented work peachy.

BTW, another trick for those with multiple gentoo machines is to share the distfiles directory with multiple machines. In fact, if you use any other OS that grabs source files (such as FreeBSD ports), they should be able to share with gentoo just fine. (I'm sharing between FreeBSD and gentoo right now)

I kinda like to remove the whole directories, it gives me the feeling of getting rid of old crap (just like i did when i removed my windows partition). The fact that I have to download it again isn't really a problem because usually my cable connection gets impressive speeds

There may be a better way of doing it (is there an environment variable you can set temporarily when emerging hungry apps?) so I'm quite prepared to be shot down for not RingTFM . That said, it worked for me and let me re-emerge my fried glibc.[/code]

_________________Will today be the day rights are taken from The People?

I had a similar problem except mine was that my '/' partition was not large enough to support '/opt' so i moved '/opt' to my '/home' partiton and then linked it to where it should be. Then later i found out that if i put '/opt' on it own partition that i wont loose any of its data if i have to reinstall because the installation process doesnt need to write to '/opt'_________________Blizzard you suck.