Subject: Re: var very full
To: None <radhika@88thstreet.com>
From: Kevin Brunelle <kruptos@mlinux.org>
List: netbsd-help
Date: 10/08/2006 15:30:41
On Sunday 08 October 2006 09:06, radhika wrote:
> Hi,
> I am running netbsd 3.0 on i386.
> I  notice var is almost 50% of my 14G.
> In var I noticed a backups directory with etc, and var in it.
> What is the backups being used for?
> How can I clean up var ie. remove old files without breaking anything.
>
> thanks,
> Radhika

/var/backups is used by /etc/security (see security.conf(5)) for more details.  
Basically, it's used to keep copies of vital files if they have changed.  
This should not be that large and I personally do not recommend deleting it.  
Especially considering we're talking about a 14G drive here and not something 
smaller than a gig where the few megs you would recover would really matter.

You can try cleaning up /var/tmp  with
find /var/tmp -atime +3 -exec rm {} \;

That will delete any files not access within three days.  You can also delete 
old log files (those with .gz in /var/logs) that you don't need anymore.

But the big thing is to locate where the space is going,  Try "du -k | 
sort -rn | head" for a good idea of where you should be looking.  The larger 
the directory or file the more you should look closely at it and see what's 
happening.  Once you know what is taking up the space, you will have a better 
idea of how to fix it and possibly prevent it from recurring.

-Kevin