Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2005

    * /var partition almost full, help

    My /var partition is 9.7G total space. When I had my server almost 5 months ago, only 500mb was used. Now, it's 90% full; almost 9Gb. How do I clean it up, which files are safe to delete? I had no idea it'll use this much space. Any help will be appreciated.

  2. #2
    Try to delete some logs in /var/log
    maybe they grow up


  3. #3
    Join Date
    Aug 2004
    cochin -kerala -india
    Just check which directory in your /var is taking up the space..using the command [/var]# du -h
    Also check du -hs spool/ , du -hs lost+found/, ... if you are using WHM/cpanel servers , you can try to delete the mail queue from your WHM, manage mail option, this is only if you are having a lot of undelivered mails. And if lost+found is taking up a lot of space in /var you can clear it using perl script.
    Check out which directory is taking up the space.

    Shibu C Varughese Support for Webhosts

  4. #4
    Join Date
    Jun 2005
    Depending on what flavor of Linux/Unix you are using, you can also clean up /var/tmp if it is too big. You may have to be carefull though, some applications require a proper procedure. At boot time should be safe.

    Use 'du -k --max-depth=1', to see how large the directories actually are. If you replace '1' with '2' you get to see the subdirectories too, with '3' the subsubdirectories...


  5. #5
    Join Date
    Jan 2005
    My logs are fairly small, not even 1 gb. The biggest folder inside /var was the /lib/mysql folder which took 6.8GB I saw a handful of files over 1GB in size, their extensions are .001 - .020 not all of them are big.

    I really think something is wrong, some of them must not be needed since the modified date is a few months ago. How do web hosting ocmpanies deal with var partitions becoming full? There's gotta be something abnormal going on my server, each day. the percentage used for /var goes up 1%, it just started to happen a month ago, before it didn't use up at this pace.

  6. /var/lib/mysql has a list of directories in there.

    # du -s /var/lib/mysql/* | sort -rn | head
    The command above should give you the top 10 directories consuming the most space in /var/lib/mysql.

    More than likely these are databases.

    Once you have them, you can use

    # du -skh /var/lib/mysql/database_name/
    to get human friendly numbers.The directory name should equal the database name and you should be able to track that back to a user.

    Philip Reynolds
    Value for money dedicated servers
    at Rack365 -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts