LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   root partition is getting big (https://www.linuxquestions.org/questions/debian-26/root-partition-is-getting-big-630622/)

mikieboy 03-25-2008 06:17 PM

root partition is getting big
 
I have 11Gb allocated for my / partition, 1Gb /swap and another 20Gb for /home.
I have just noticed that my / has grown to about 10Gb currently. Since this system was originally a standard Sarge desktop install (I think about 5Gb in /) and I have only added a few extra packages such as Amarok and Kmymoney, I don't know why / has grown so large. At this rate I am in danger of running out of space.
Any suggestions as to the cause or what I might do about this?

pljvaldez 03-25-2008 06:19 PM

aptitude clean

pljvaldez 03-25-2008 06:22 PM

Also, you can do a df -h to see what directories are eating up all the space. And then use du -h to find specific files.

EDIT: Here's a link to some find command parameters to help you track down large files and directories.

slackhack 03-25-2008 06:25 PM

so you mean your partition is actually getting too small. :p j/k

check your /var/log directory too, if it's on your / partition. maybe something is out of whack and some big files are building up.

BrianK 03-25-2008 06:36 PM

a suggestion:

cd /
du -h --max-depth=1

find the biggest dir, cd into it, re-run the du command "!du".

repeat until you find the offensive files/directories, then do something about them.

mikieboy 03-25-2008 06:54 PM

@ pljvaldez:

I didn't know about "aptitude clean".
I ran that command and I now have 5.1Gb free space in / just like that. :)

I'll try the other suggestions as well to grab some more space back.

Many, many thanks guys. :cool:

pljvaldez 03-25-2008 06:57 PM

Quote:

Originally Posted by mikieboy (Post 3100395)
I didn't know about "aptitude clean".
I ran that command and I now have 5.1Gb free space in / just like that. :)

Basically, whenever you run an upgrade or dist-upgrade, all the packages that get downloaded are stored on your hard drive until you clean them out. So if you've never run clean, it may have been that all the packages from your Etch update were still on the machine.

mikieboy 03-25-2008 07:32 PM

Thanks, that'll almost certainly have been the case then.

I've run "df -h" and "du -h --max-depth=1" as suggested and then run "!du" on /var (427M).

The output is:

Quote:

124M ./lib
33M ./cache
12K ./backups
4.0K ./local
4.0K ./lock
243M ./log
224K ./run
188K ./spool
28M ./tmp
4.0K ./opt
16K ./mail
8.0K ./games
128K ./www
427M .
Is there a proper way to clear out ./log? What about ./run and ./spool?

BrianK 03-25-2008 08:09 PM

Quote:

Originally Posted by mikieboy (Post 3100436)
Thanks, that'll almost certainly have been the case then.

I've run "df -h" and "du -h --max-depth=1" as suggested and then run "!du" on /var (427M).

The output is:


Is there a proper way to clear out ./log? What about ./run and ./spool?

you don't want to mess with run.
spool contains mails, probably also not something to mess with directly.
(besides both together only amount to less than 1 MB).

- in log, you can remove all of the gzipped files.
- you can also echo "" > some_file to clear any large logs, though that's probably not necessary after removing the gz files.
- to properly manage your log files, you should have logrotate working. I've never put much effort into this, so I can't help you with it.

btw, I didn't know about aptitude clean either. good tip!

farslayer 03-25-2008 11:02 PM

I use localepurge to help keep the space in check..

No reason to have man pages in 50 languages when you only refer to one... localepurge automagically gets rid of the man pages you don't need.


All times are GMT -5. The time now is 04:30 PM.