How to free up disk space?

arowana

New Member
In my Power Panel,i see that my disk usage is going up at an unusual rate.From a 6 gb + to 4.92 gb diskspace available now.Just wondering if this is normal or?Also,i just ran a du -h --max-depth=1 command and here's the results

292K ./.MirrorSearch
16K ./.gnupg
16K ./.cpobjcache
924K ./.cpcpan
20K ./.spamassassin
12K ./cpanel3-skel
8.0K ./public_html
4.0K ./public_ftp
4.0K ./.ssh
1.4M

Any idea where the usage went to?Any more SSH commands to ran?
 
In my Power Panel,i see that my disk usage is going up at an unusual rate.From a 6 gb + to 4.92 gb diskspace available now.Just wondering if this is normal or?Also,i just ran a du -h --max-depth=1 command and here's the results



Any idea where the usage went to?Any more SSH commands to ran?

Looks to me like you ran du in the root directory. After you log in do a cd / and then run it again.

If you upgrade CPanel or even any software through WHM then there will be folders created in the /home folder that you can go ahead and get rid of assuming everything is running alright.

Hope that helps,

Dan
 
Looks to me like you ran du in the root directory. After you log in do a cd / and then run it again.

If you upgrade CPanel or even any software through WHM then there will be folders created in the /home folder that you can go ahead and get rid of assuming everything is running alright.

Hope that helps,

Dan

Hi.Thanks for the reply.:) Here's what i got again after i ran du:
8.5M ./sbin
8.0K ./dev
104M ./var
4.1M ./scripts
260M ./proc
16M ./lib

/home folder?u mean delete everything in the tmp folder or?:confused:
 
Hello arowana,

I'm afraid you may have cut du off before it was finished running. I just ran it here and it pauses for quite a while at the same point you posted as it's sizing up some pretty large directories. You can try it again and be sure to let it finish running (your prompt will return). You can run it on your home directory all by it's self too du /home -h --max-depth=1. If you see folders there other than what you've created in the way of user accounts then they are most likely from cpanel/software updates. I always set cpanel updates to manual myself and then just run it every now and then. You can post the results here if you're unsure of course.
 
root@ns1 [~]# du /home -h --max-depth=1
458M /home/asiarcom
8.0K /home/.cpcpan
39M /home/.cpan
223M /home/cpapachebuild
4.0K /home/MySQL-install
720M /home
root@ns1 [~]#

Here's the stats again.Can anyone tell me which and how to delete them off please?
 
You're going to have to go through asiarcom's home folder and do some housecleaning. There's nothing there that you can just flat out delete without further inspection unless asiarcom is no longer an active user.
 
Hello arowana and khiltd,

khiltd,

I always delete things like
8.0K /home/.cpcpan
39M /home/.cpan
223M /home/cpapachebuild
4.0K /home/MySQL-install
you do not think it's safe to do so? these are the downloaded files before those particular modules have been upgraded from what I have been able to ascertain.

arowana,

While I see over 300 meg there that I feel is safe to remove that does not account for the 1.1 gig difference that you're saying you've lost. was the 6 gig number you gave before you put your account (asiarcom) in as well? that would be a total of 800 meg anyways...

I would change directories to the home directory before removal of those folders just to be safe so it would be
Code:
cd /home
rm -f -r dirname
be very wary though as with the -f switch you get not prompt asking if you're sure
 
Thanks khiltd and Dan for your pointers.I'll try each method and see.You guys and KH are great! :) Thanks!
 
I always delete things like
you do not think it's safe to do so?

If you never intend to rebuild Apache or any of its associated modules it might make sense. Otherwise I'd leave those source trees where they lay.
 
It is absolutely safe to remove /home/cpapachebuild directory after recompilation was completed. If you'll ever need to recompile Apache/PHP again cPanel will automatically download source tarballs and will re-create this directory using the latest source code. Keeping this directory in place doesn't do anything good but takes ~250MB of your disk space

Regards,
Paul
 
Keeping this directory in place doesn't do anything good but takes ~250MB of your disk space

It saves an awful lot of time and that can be good when you accidentally rebuild without a certain option that breaks entire sites and you have to do it all over again in a hurry.
 
Sure, if mistake in options selection was made or some additional option is required then, sure, existing source code will help to correct such mistake a bit faster. Incorrect compilation usually gets detected within couple minutes and, as such, just keep the source code for couple hours and then kill the /home/cpapachebuild directory to free up some disk space.
On the other hand I've seen more than single case when existing source code negatively affected Apache/PHP compilation process. As one of the examples - php upgrade from 4.x to 5.x can go completely wrong if you already have old source code left from previous PHP 4.x compilation and "Skip Apache Build if up to date" option wasn't checked.

Regards,
Paul
 
Top