PDA

View Full Version : Cleaning up my var directoy



spewperb
20th October 2008, 04:54 PM
Hi everyone,

I'm trying to fix my web server. The problem is /var is on its own partition and is dangerously close to being full. What can I remove from here to free up some space and stop my server from dieing?

Cheers

Hlingler
20th October 2008, 05:12 PM
Where's the disk space used? Check and post output:
sudo du -chx --max-depth=1 /var/

V

spewperb
20th October 2008, 05:14 PM
.0K /var/opt
8.0K /var/racoon
32K /var/lock
8.0K /var/preserve
24K /var/yp
280K /var/run
8.0K /var/local
26M /var/cache
8.0K /var/tmp
8.0K /var/cvs
28K /var/db
16K /var/crash
12M /var/www
4.0K /var/genpkglist
8.0K /var/tux
55M /var/lib
8.0K /var/nis
816K /var/spool
16K /var/lost+found
128K /var/named
24K /var/empty
1.3M /var/streaming
12K /var/account
3.4G /var/log
3.5G /var/
3.5G total

Hlingler
20th October 2008, 05:19 PM
Good Gawd! 3.4 GB in /var/log/ !?!?!? Never check your log files, eh? Well, start there....

V

Moncho
20th October 2008, 05:36 PM
Where's the disk space used? Check and post output:
sudo du -chx --max-depth=1 /var/

V

Excellent command!

Cheers...

forkbomb
20th October 2008, 05:47 PM
Face-palm.

Try sorting the contents of /var/log by date and delete some old ones. Or best yet, use the find command by date to find old ones.