The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cleaning up disk space - can I delete this?

Discussion in 'General Discussion' started by TogaDave, Feb 11, 2005.

  1. TogaDave

    TogaDave Well-Known Member

    Joined:
    Apr 13, 2003
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    I'm trying to free up some disk space on my server, and the only thing that I'm *sure* that I can delete is files older than a few days in the /tmp/ folder. I see older files in a few other places, but I'm not sure if it's OK to delete them.

    I'm currently running:
    WHM 10.0.0 cPanel 10.0.0-C6
    RedHat 7.3 i686 - WHM X v3.1.0
    Apache 1.3.33
    PHP 4.3.10
    GD 2.19
    Perl 5.84

    For example, are any of these files or folders safe to delete?

    Under: /home/installd/buildapache/
    curl.7.9.8.tar.gz
    php-4.2.2.tar.gz
    php-4.2.3.tar.gz
    gd-1.8.4.tar.gz.
    apache_1.3.27.tar.gz
    /php-4.2.3/
    /apache_1.3.27/
    /wp-cpup/perl-5.6.1/

    I'm really not sure where else to look, but I know that I need to free up some space. In my WHM Service Status I can see that the smaller partition of the drive (which I'm assuming contains important system files) has gone from 40% used up to 65% percent and it grows a little each day.

    Are there certain files or folders that are normally safe to delete that I'm unaware of?

    As always, any advice is greatly appreciated, thank you.
    Dave
     
  2. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Might pay for you to check the /var/log directory for large logfiles. Also /usr/local/apache/logs and /usr/local/apache/domlogs. Running "du -sh" at the prompt in those directories will give you a total size.

    Also Squirrel on this forum provides some log file scripts that you may be interested in.
    http://www.premierwebsitesolutions.com/scripts/
     
  3. TogaDave

    TogaDave Well-Known Member

    Joined:
    Apr 13, 2003
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    Thank you sawbuck, I'm looking into those now!
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Btw, you can certainly delete the directory and its contents /home/installd/* it's sitting there wasting space and will never be removed unless you do it. Just don't delete your /home directory ;)

    /tmp is usually cleared down on a 72 rotating basis by /etc/cron.daily/tmpwatch If you edit that script you can reduce the period down to, say 24 hours. Using tmpwatch to do this is a good diea as it shouldn't delete any files that are actively being used.
     
  5. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Perhaps chirpy, or someone else knows this, too:

    Can I safely delete /home/cpapachebuild and /home/cpzendinstall? They'll be recreated when I run the scripts again, right?
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Yup. You can add /home/cpins/ to that list if it exists. As you say, the two you mentioned will be recreated when you next build apache and zend.
     
  7. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Thanks, chirpy. cpins/ also deleted :)
     
  8. TogaDave

    TogaDave Well-Known Member

    Joined:
    Apr 13, 2003
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    Excellent, thanks guys, this is helping a lot!

    I think maybe something is not right in tmpwatch on mine because I recently a bunch of sess_xxxxxxxxxxxxxxxxx files out of there that had accumulated for a about a month. I'll have to look more into this when I get a chance. Thanks for the tip!!!
     
  9. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I double-checked. By default it is 720 hours in the tmpwatch cronjob, not 72, which equates to 30 days. You might want to change that down to a much lower number of hours.
     
Loading...

Share This Page