cPanel server Disk Space is full

[Total: 4    Average: 5/5]

If you are facing disk space issue on your cPanel server then you can removed unwanted old backup files, core dump files and much more.

Please follow the some basic tips if your cPanel server disk space is full

cPanel:

Find all files greater than 256MB, excluding the /home/virtfs folder:

find / -path '/home/virtfs/*' -prune -o -type f -size +256000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

Find domains storing over 1GB of mail (remember not to delete people’s mail without their permission):

du -h --max-depth=1 /home/*/mail/ | grep G

To search cPanel upload temp files.

ll  /home/*/tmp/Cpanel_* | awk '{print $6 " " $7 " " $8 " " $9}'

To search core dump files.

find /home/*/ -path '/home/virtfs/*' -prune -o -name core.[0-9]*

To Search large “error_log” files.

find /home/*/ -name 'error_log' -exec du -sh {} \; > /root/test.txt

To remove fantastico backup files.

ll /home/*/fantastico_backups | awk '{print $6 " " $7 " " $8 " " $9}'

To clearing the EximStats Database.
Checking EximStats Database Size
The most common reason for deleting your EximStats is your eximstats database is to large. To run a quick check on this database we transition into SSH and enter the command:

[~]# du -sh /var/lib/mysql/eximstats

Clearing the EximStats Database
To delete the database entries we must first enter MySQL by entering:

[~]# mysql

Once authenticated please enter the following commands:

mysql> use eximstats
mysql> delete from defers;
mysql> delete from failures;
mysql> delete from sends;
mysql> delete from smtp;

——-

Exiting EximStats Database
Last but not least we exit out of MySQL and recheck the database size by entering the commands:

[~]# exit
[~]# du -sh /var/lib/mysql/eximstats

And thats it! You have successfully cleared out your servers EximStats database and hopefully cleared up a few GB’s of space 😉