[lug] Cleaning up /var when it gets too full

bof bof at pcisys.net
Mon Sep 16 09:11:46 MDT 2002

Sexton, George wrote:

>It would be helpful if you did
>du -s *
>from the /var directory so you could see where your space is going.

Here's the listing of /var using du -sh *

    1.5M    cache
    1.0k    db
    2.0k    empty
    109M    lib
    1.0k    local
    2.0k    lock
    1.1M    log
    12k    lost+found
    0    mail
    1.0k    nis
    1.0k    omninames
    1.0k    opt
    1.0k    preserve
    17k    run
    196k    spool
    1.0k    tmp
    158k    www
    1.0k    yp

It would appear that the lib directory is taking up most of the space. 
So using du -sh * against lib, I find

    3.0k    alternatives
    39M    dbbackup
    1.0k    dosemu
    1.0k    games
    1.0k    htdig
    1.0k    logrotate.status
    1.2M    mason
    1.0k    misc
    1.0k    random-seed
    30M    rpm
    29M    rpmrebuilddb.18035
    804k    scrollkeeper
    1.7M    slocate
    2.0k    texmf
    8.0M    tripwire
    2.0k    xdm
    2.0k    xkb

So most of the space is taken up by rpmrebuilddb and the dbbackup 
directory, the contents of which are

    9.5M    rpm-2002-07-25.tar.bz2
    9.6M    rpm-2002-08-12.tar.bz2
    9.7M    rpm-2002-08-28.tar.bz2
    10M     rpm-2002-09-13.tar.bz2

 From the above,  I gather that I can delete the first three rpm files, 
and the rpmrepbuilddb.18035 file to regain almost 60 Mb of space.
I don't use mason, so I've uninstalled it.

Is there anything else I could delete safely?

And what about regaining space automatically? I do use logrotate for 
keep my log files, but is there anything else I could be doing?


More information about the LUG mailing list