Home > Support > HOWTO List > Where has all my disk space gone?

Running Out of Disk Space?


du --all --one-file-system / | awk '{if($1 > 102400) print int($1/1024) "MB" " " $2 }'

This will find files/directories larger than 100MB and output something like:

    101MB /var/mail/root
    101MB /var/mail
    109MB /usr/bin

A similar command will find the biggest few directories on your server to help you narrow down your search:

du -mxS / | sort -n | tail

Places to check

Common big users of space are log files that keep growing and aren't truncated/rotated (e.g. with logrotate).

Package manager archives using a lot of space? (eg /var/cache/apt/archives). Run 'apt-get clean' or on rpm based installs do 'yum clean all' .  That will clear out the rpm files that apt downloads when it installs new RPMs.

Nine times out of ten most (possibly reclaimable) space is used up under /var or /home.  /usr will typically be largeish (a GB or two) but its contents are typically required to run your server. Don't mess with /proc.

If you need more disk space and you are on a RimuHosting VPS, you can add more space from our control panel on the resource change page.

Also check Liz's blog post for some more tips.

Disk Check Script

Looking for a script to check disk usage, and alert you when you go over a certain threshold?  Find one here: