View previous topic :: View next topic |
Author |
Message |
holmis n00b
Joined: 16 Mar 2003 Posts: 72 Location: Sweden
|
Posted: Tue Mar 18, 2003 10:18 pm Post subject: |
|
|
Hey, I did this
Code: | rm /usr/portage/distfiles/* && rm -r /var/tmp/portage/* |
stuff.
But I am still left with over 4Gb occupied disk space!
In addition to the Gentoo system, I have installed xfree, kde and alsa and that did not require 4Gb on RedHat (rather below 3Gb with Gimp, KOffice and much more).
What have I missed?
/to-be-out-of-space |
|
Back to top |
|
|
tukem Tux's lil' helper
Joined: 25 Jun 2002 Posts: 114 Location: Tampere, Finland
|
Posted: Wed Mar 19, 2003 2:31 pm Post subject: |
|
|
One reason for having 4GB instead of 3GB is that you have a lot of libraries laying around that you wouldn't need in redhat. The number of installed kernel sources is also worth checking. I have 4 kernel versions in /usr/src and it takes 650MB. |
|
Back to top |
|
|
krustofan n00b
Joined: 19 Mar 2003 Posts: 1
|
Posted: Wed Mar 19, 2003 4:11 pm Post subject: |
|
|
holmis wrote: | Hey, I did this
Code: | rm /usr/portage/distfiles/* && rm -r /var/tmp/portage/* |
stuff.
But I am still left with over 4Gb occupied disk space!
|
I have a similar problem. I've deleted the files of /usr/portage/distfiles and /var/tmp/portage/* and i think i've deleted about 1,5 Gb. However, when i do a "df" in the /dev/ROOT partition the used space is 100% (3,1 GB)... What's happening to me? It's really strange, because I'm downloading just now the OpenOffice and everything's ok, there's no any problem about disk space.....
Another thing... Is there a really good disk partition manager for Linux? I mean, something like Partition Magic or similar...
Thanks. |
|
Back to top |
|
|
Scottaroo n00b
Joined: 11 Feb 2003 Posts: 30 Location: Indianapolis, IN
|
Posted: Tue Mar 25, 2003 5:38 pm Post subject: Diskspace and OpenOffice |
|
|
krustofan wrote: | holmis wrote: | Hey, I did this
Code: | rm /usr/portage/distfiles/* && rm -r /var/tmp/portage/* |
stuff.
But I am still left with over 4Gb occupied disk space!
|
I have a similar problem. I've deleted the files of /usr/portage/distfiles and /var/tmp/portage/* and i think i've deleted about 1,5 Gb. However, when i do a "df" in the /dev/ROOT partition the used space is 100% (3,1 GB)... What's happening to me? It's really strange, because I'm downloading just now the OpenOffice and everything's ok, there's no any problem about disk space.....
Another thing... Is there a really good disk partition manager for Linux? I mean, something like Partition Magic or similar...
Thanks. |
Greetings:
Not only is the OO source 135MB, but the build process sucks up disk space like nobody's business. My first attempt to build OO failed because I ran out of disk space. The build required 1.5GB of free disk space before it would build without filling up the disk and failing. Hope you have plenty of space! _________________ If Microsoft is your answer, you obviously did not understand the question. |
|
Back to top |
|
|
holmis n00b
Joined: 16 Mar 2003 Posts: 72 Location: Sweden
|
Posted: Tue Mar 25, 2003 7:28 pm Post subject: |
|
|
Well,,,, I realised that I may have made a mistake. I could perhaps have mistaken another disk with my root partition.
After emerging OO I was surprised to see I was left with only slightly above 2 GB occupied disk space (instead of 4 as when I started the emerge). This seems unlikely and my other disk is still occupied to something like 4.1 GB and there haven't been many changes on that.
I will never know how it really was, but I believe it was a mistake. Glad I'm not an admin somewhere right now. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Thu Apr 03, 2003 7:57 pm Post subject: |
|
|
Can I remove /usr/portage/packages/All tbz2 files?
/etc/make.conf wrote: | the location of binary packages that you can have created
# with '--buildpkg' or '-b' while emerging a package. This can get
# upto several hundred megs, or even a few gigs. |
man emerge wrote: | --buildpkg (-b)
Tells emerge to build binary packages for all ebuilds processed
in addition to actually merging the packages. Useful for main-
tainers or if you administrate multiple Gentoo Linux systems
(build once, emerge tbz2s everywhere). The package will be cre-
ated in the ${PKGDIR}/All directory. | So, the tbz2 files allow you to more quickly reinstall from a binary package you've already compiled. They can certainly be removed, but can also be helpful. See this post in Cleaning out stale distfiles for one way to keep some binaries, while removing duplicates. I think the same thread has other ways of doing the same. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
helmers Guru
Joined: 16 Sep 2002 Posts: 553 Location: Stange, Norway
|
Posted: Sat Apr 26, 2003 11:45 pm Post subject: |
|
|
Guess I'm just spoiled, I've got 3 120GB HD's, and I don't really care about the size of my distfiles dir.
But what I don't like very much is that portage doesn't clean up the /var/tmp/portage/* directory on its own.
Is is safe to remove everything inside /var/tmp and /tmp? If so, I'd like to add it to my /etc/conf.d/local.stop. _________________ C is for Cookies! |
|
Back to top |
|
|
bludger Guru
Joined: 09 Apr 2003 Posts: 389
|
Posted: Wed Jul 30, 2003 9:56 am Post subject: |
|
|
This script did not work perfectly for me, in that it deleted the X430src-1.tgz - X430src-4.tgz files (it left the fifth file though). This means that if I wanted to recompile X, I would have to download everything again.
Rather than just compare the filenames in this directory, the script should really delete source files not owned by any installed packages. Ideally this should be integrated into the emerge or some other portage command. |
|
Back to top |
|
|
angill Tux's lil' helper
Joined: 26 Aug 2003 Posts: 87 Location: Ohio
|
Posted: Wed Aug 27, 2003 3:33 pm Post subject: Re: Free 100Mb+ of space!! |
|
|
pjp wrote: | 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. |
Does this work?? using the -b flag and then when you go to emerge on a rebuild it doesn't have to compile? just installs?? _________________ what if the hokey pokey is what it's all about? |
|
Back to top |
|
|
mihochan Apprentice
Joined: 16 Apr 2002 Posts: 296 Location: Melbourne again
|
|
Back to top |
|
|
X Apprentice
Joined: 30 Apr 2002 Posts: 192 Location: Lexington KY
|
Posted: Tue Oct 14, 2003 2:06 am Post subject: |
|
|
I use something like this to get rid of stuff in distfiles or /tmp or wherever
Code: | find /usr/portage/distfiles -atime +30 -type f -exec rm {} \; |
It checks the last time each file in /usr/portage/distfiles was accessed, and if it was longer than 30 days ago, it removes it.
Sometime I'll try a command like that on / with an atime of around a year, just to see if my system still works afterwards. |
|
Back to top |
|
|
kitano Apprentice
Joined: 19 Dec 2002 Posts: 228 Location: Munich, Germany, Europe, Earth
|
Posted: Tue Oct 14, 2003 10:30 am Post subject: |
|
|
X wrote: | I use something like this to get rid of stuff in distfiles or /tmp or wherever
Code: | find /usr/portage/distfiles -atime +30 -type f -exec rm {} \; |
It checks the last time each file in /usr/portage/distfiles was accessed, and if it was longer than 30 days ago, it removes it.
Sometime I'll try a command like that on / with an atime of around a year, just to see if my system still works afterwards. |
yeah, do it, i'm pretty courious about the result. *g*
you gonna be losing files that you care about, i guess.
hmm, *lol* maybe i can hack your box just shortly before and set the sytem time one year to the future *evilishgrin*
maybe a complete backup is recommended before starting ... _________________ ->searched for a gentoo penguin ->alienated it with "find edges", "saturation", "photocopy" ->encoded quicktime from still ->played with aaxine ->screenshotted ->made it my avatar
only in case you were going to ask what it is... |
|
Back to top |
|
|
smith Apprentice
Joined: 12 Sep 2003 Posts: 222
|
Posted: Fri Nov 07, 2003 4:49 pm Post subject: |
|
|
Kosmo wrote: | I thought it was more difficult to code, but this seems to work.
I have put this script in /etc/cron.daily, you may want to put it in weekly or something, hourly seems overkill to me
Comments are welcome
Code: |
#!/bin/sh
# Directory to check
dir=/usr/portage/distfiles/
# Maximum size directory should be in kilobytes
# DONT SET THIS TOO LOW
maxsize=500000
#-------------------------------------------------------
size=`du $dir | cut -f 1`
cd $dir
while [ "$size" -gt "$maxsize" ]
do
echo "about to delete something"
rm -R `ls --time=access --sort=time $dir | tail -1`
size=`du $dir | cut -f 1`
done
|
|
I am not familiar with scripts cron etc.. How do I save the file? I tried nano /etc/cron.daily/cleanfiles then I pasted your code in and hit save and exit.. will that actually work?
or is there something else I must do?? _________________ gentoo portage > * |
|
Back to top |
|
|
matbintang n00b
Joined: 12 Aug 2003 Posts: 22 Location: Canada
|
Posted: Thu Nov 20, 2003 3:06 am Post subject: |
|
|
X wrote: | I use something like this to get rid of stuff in distfiles or /tmp or wherever
Code: | find /usr/portage/distfiles -atime +30 -type f -exec rm {} \; |
It checks the last time each file in /usr/portage/distfiles was accessed, and if it was longer than 30 days ago, it removes it.
Sometime I'll try a command like that on / with an atime of around a year, just to see if my system still works afterwards. |
I tried that to clean out some stale files that I always create on my SUN workstation at work. However I realised that the script will only work once becuase after passing over the files the "last access time" changes to the current time and date. However I could be worng.... _________________ $>cd /pub
$>more beer |
|
Back to top |
|
|
Stu_28 Tux's lil' helper
Joined: 12 Jun 2003 Posts: 129
|
Posted: Thu Nov 27, 2003 2:48 pm Post subject: |
|
|
You could just use the mtime, unless you are touching those files after you install, that should be good enough. Also, tmpreaper is a nice replacement for the find method on a multi-user box (it's a little more resistant to exploits than find):
Code: |
/usr/sbin/tmpreaper 30d --mtime --force /usr/portage/distfiles
|
|
|
Back to top |
|
|
deadhead n00b
Joined: 12 Nov 2002 Posts: 25
|
Posted: Wed Jan 07, 2004 11:46 pm Post subject: Another source of running out of diskspace. |
|
|
I installed MySQL for the first time with Gentoo on a development server with plenty of diskspace. Developed a PHP application that used it with no problems. After I put this application on another machine and into production environment for about a month, I noticed that 1/4 the drivespace was gone. Panic, deep breath.
It seems that the default configuration of MySQL that gentoo installed had logging of all queries turned on. Whatever handles rotating logfiles was not configured to handle this log. As a matter of fact IIRC, the log file was in a weird place as well. I found the setting in my.cnf and deleted the 4G file. Whew! MySQL ebuild seems to have changed to a more sane default config now. |
|
Back to top |
|
|
gava77 n00b
Joined: 12 Jan 2003 Posts: 6 Location: Groningen, The Netherlands
|
Posted: Sat Jan 31, 2004 8:17 pm Post subject: |
|
|
Does anyone know if there is a forum or other location where the installed size of programmes are stated. I am a low grade system user and have only left 250 Mb of free space at the moment, so for me space management is very important.
I'd like, for instance, to install MySQL, PHP and Apache but I do not know if I have enough space. I also searched for a function in emerge to gather the size of an ebuild after compiling, but obviously there is no one.
Do some more advanced users have tips for me?
Thank's for answering! |
|
Back to top |
|
|
neuronal Apprentice
Joined: 11 Feb 2003 Posts: 174 Location: Alicante/Spain
|
Posted: Mon Feb 02, 2004 2:34 pm Post subject: |
|
|
Hi
Some months ago I've made another simple bash-script to free space. It's very simple. You can found here with some explanations (in spanish).
Greetings! _________________ #!/Enrique/Barbeito/García ...
http://enrique.barbeito.org |
|
Back to top |
|
|
mlsfit138 Guru
Joined: 20 Sep 2003 Posts: 406 Location: Washington
|
Posted: Wed Feb 11, 2004 8:33 am Post subject: Re: Free 100Mb+ of space!! |
|
|
Naan Yaar wrote: | /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.
Anybody else have some space-saving tips? |
|
I might get flamed because this seems like such a no-brainer, but I'm pretty sure that cleaning out /var/tmp/portage during an emerge would be bad! _________________ "Everytime you justify
another good in you dies"
-Converge, The Saddest Day, Petitioning the Empty Sky |
|
Back to top |
|
|
franoculator Tux's lil' helper
Joined: 11 Apr 2003 Posts: 125 Location: My Fake Leather Chair
|
Posted: Thu Feb 19, 2004 9:31 pm Post subject: |
|
|
pjp wrote: | Good idea, then it can be put into a cron job. |
I did that once. Then, the cron-job ran while I was unpacking a rather large packing, and the emerge failed. I don't imagine that it's likely to do that very often, but it may be a concern for some. |
|
Back to top |
|
|
latz-twn Tux's lil' helper
Joined: 08 Nov 2003 Posts: 95 Location: Luxembourg
|
Posted: Thu Feb 19, 2004 10:59 pm Post subject: |
|
|
For me adding in the make.conf
AUTOCLEAN="yes"
worked fine |
|
Back to top |
|
|
dkaplowitz Guru
Joined: 22 Nov 2003 Posts: 596 Location: Philadelphia, PA
|
Posted: Tue Mar 09, 2004 2:18 pm Post subject: |
|
|
I tried this, but now when I do an it basically says everything is up to date, even though I know it's not. I've done an emerge sync too.
Is there a command I can run to let emerge know what's on my system?
Thanks,
Dave _________________ http://dkap.info |
|
Back to top |
|
|
madCoder|GN Tux's lil' helper
Joined: 06 Jun 2003 Posts: 80
|
Posted: Tue Mar 23, 2004 3:53 am Post subject: Re: distfiles shell script |
|
|
For those of you who may have a cvs-src directory under distfiles/, the shell script on the first page will likely not work for you. Try this instead:
Code: |
#!/bin/sh
# Directory to check
dir=/usr/portage/distfiles/
# Maximum size directory should be in kilobytes
# DONT SET THIS TOO LOW
maxsize=200000
#-------------------------------------------------------
size=`du -s $dir | cut -f 1`
cd $dir
while [ "$size" -gt "$maxsize" ]
do
DELFILE=`ls --time=access --sort=time $dir | tail -1`
echo "Deleting ${DELFILE}..."
rm -R ${DELFILE}
size=`du -s $dir | cut -f 1`
done
|
the -s argument gets the size of the directory parent, and prevents printing any subdirectories, ie:
Code: | # du /usr/portage/distfiles/
1 /usr/portage/distfiles/cvs-src
196274 /usr/portage/distfiles |
Code: | # du -s /usr/portage/distfiles/
196274 /usr/portage/distfiles | [/code] _________________ madCoder <madCoder@gamesurge.net>
Abuse Manager
http://www.gamesurge.net/ |
|
Back to top |
|
|
dkaplowitz Guru
Joined: 22 Nov 2003 Posts: 596 Location: Philadelphia, PA
|
Posted: Thu Mar 25, 2004 12:25 pm Post subject: |
|
|
dkaplowitz wrote: | I tried this, but now when I do an it basically says everything is up to date, even though I know it's not. I've done an emerge sync too.
Is there a command I can run to let emerge know what's on my system?
Dave |
_________________ http://dkap.info |
|
Back to top |
|
|
zfc-tinkerer Tux's lil' helper
Joined: 05 May 2003 Posts: 126
|
Posted: Sun May 23, 2004 2:05 am Post subject: |
|
|
One caution here:
If your networking uses a separate package you emerge, then you don't want to clean the version you're using out of distfiles, or else when you recompile your kernel, you won't have a network module, and you can't emerge it because you can't get to the network!
I found this out the hard way by having to use the boot disk to get the NforceNet module reinstalled on my machine. If you do delete it in cleaning this directory out it's not a big deal, just run emerge -f <name of your module> |
|
Back to top |
|
|
|