Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have my server on Mediatemple and i reached my 20GB quota. I installed Ubuntu and many plugins but I don't know how I reached that 20GB? I'm running a website but I'm sure it is not taking all that space!

share|improve this question

sudo du -x / | sort -n will at least show you what's using space. As to whether it's legitimately using space or not is up to you to decide.

share|improve this answer
Oh that's much simpler than my method =) – Smudge May 16 '11 at 2:10
wow...i foudn out that all my space about 19gb is taken by logs files!!! apache/error.log is 17gb!!! should i delete them?? is it possible to set a purge weekly? – Francesco May 16 '11 at 2:17
@camelCase, if you have that large of a error log file, maybe you want to investigate why you have so many errors, instead of just wiping it out... – Holocryptic May 16 '11 at 3:13
@Holocryptic is correct, but once you have done that you really need to enable logrotate so that you don't have this happen again. It compresses older logs for space and can throw away logs after a window. – n8whnp May 16 '11 at 9:27

Shell in, cd to / and run

du -d 1 -h ./

(That will give you the total size of each directory).
CD to the largest directory and run the command again, rinse and repeat till you find all the big files =)

The process might not have been 100% clear, when you run DU it'll give you a list of folders and their sizes like

2GB /foldera
1GB /folderb

So in that case, CD into foldera and run the du command again, that'll give you the list of largest files/folders in there, keep drilling down till you find the largest files. If you don't need them, remove them.

share|improve this answer

If you have ssh-access and a linux box, you can easily graph your disk with baobab. This tool can also read remote folders via ssh and makes a circle diagram.

Also on my box du has no -d option and I use sudo du -h --max-depth=1 / get an overview on command line.

share|improve this answer
Are you sure your version of du doesn't support depth limiting (the -d option)?? I've never seen one that doesn't before; what OS are you running? – Chris S May 18 '11 at 3:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.