Page 1 of 1

Help in deleting some stuff in /var

Posted: Thu Dec 06, 2012 10:34 am
by srikanth.kallu
Hi,

Can i get help in deleting some stuff in /var.

I am not sure what should i delete in there, Afraid if i delete something important

Thank You.

Re: Help in deleting some stuff in /var

Posted: Thu Dec 06, 2012 10:38 am
by mguthrie
Most things in /var ARE important. I'm assuming you're running out of hard disk space?

Is this a physical machine or a VM?

Re: Help in deleting some stuff in /var

Posted: Thu Dec 06, 2012 10:39 am
by srikanth.kallu
It's VM

Re: Help in deleting some stuff in /var

Posted: Thu Dec 06, 2012 10:42 am
by mguthrie
If you're running out of space, you're better off resizing the partition using the doc below to give the machine more hard disk space. If you have to clear space in /var to keep the system running, it's not giving the system much breathing room, and you might clear it once, but it's likely that it would fill up again.

http://assets.nagios.com/downloads/nagi ... M_Disk.pdf

Re: Help in deleting some stuff in /var

Posted: Thu Dec 06, 2012 10:53 am
by srikanth.kallu
That is good document to know hos to increase space,

I am in a stiuation that i cannot increase the space and defenetly delete something,

What is the best solution in this.

Re: Help in deleting some stuff in /var

Posted: Thu Dec 06, 2012 11:08 am
by mguthrie
First things first, delete at your own risk. If you need data from any of these files, do not delete them.

Current Logs:
/var/log/httpd/access_*
/var/log/httpd/error_*

Old Logs:
rm -f /var/log/secure.*
rm -f /var/log/messages.*
rm -f /var/log/cron.*

Mail Files
/var/spool/mail/root (this assumes don't use the root mail account on this system)
/var/spool/mail/nagios