Cleaning up /var partition - what to delete?
I'm using RH 7.3 on a small lan server. I'm continually needing to check disk use on the /var partition. Usually it is on the verge of filling up. I was wondering what stuff I can remove. One oversite I've recently fixed is logrotate was not compressing the logs, I've fixed that. However it still seems that there is way too much space eaten up on the /var partition.
Here is the output of du -h /var | grep M (for the sub directories breaking the megabyte barrior)
25M /var/lib/rpm
1.3M /var/lib/slocate
1.9M /var/lib/tripwire
16M /var/lib/anaconda-rebuilddb1036084739
44M /var/lib
3.2M /var/log/sa
70M /var/log/samba
81M /var/log
1.4M /var/cache/man
4.7M /var/cache/mondo-archive
6.5M /var/cache
1.3M /var/spool/lpd/Laserjet1200
1.3M /var/spool/lpd
88M /var/spool/up2date
89M /var/spool
1.5M /var/ftp/lib
1.8M /var/ftp
221M /var
So clearly I need to figure out what is going on the log directory. One thing that is especially strange about it is that there is both the /var/log/samba/*.logs and /var/log/samba-logs* - anyone know why there are logs in multiple places for that?
Also in /var/spool/lpd there are always old print jobs that haven't been cleaned up. What's up with that - isn't it supposed to be automated?
Finally what about the /var/spool/up2date & /var/lib/rpm - those are two full directories that I have so far been afraid to clean out. Is that where the up2date & rpm databases are stored? Can either of those directories be cleaned or is everthing in there mission critical for the rpm database and up2date service?
Any other thoughts folks have would be greatly appreciated.
Thanks
|