Skip to main content

Disk space almost full on cPanel server

I had an issue where my cPanel server was quickly running out of space. All user accounts combined were a fraction of the disk space, so I had to look in the server to see what was causing the disk usage to increase rapidly each day.

To find the issue, SSH’d into the server and ran this:

Find largest files
du -hs * | sort -rh | head -5

Once the files are found, remove them:
rm <filename>

or clear them, instead of deleting:
cat /dev/null > {FILENAME}

The culprit for me was “messages-” log files in /var/log.