How to remove error_log from all CPanel account and backups

Some scripts like WordPress and Joomla can leave a big error_log files that no one will ever look at. Try opening a 30mb log file with Word and see what happens. In most cases you can just remove this file with a simple command.

To remove all error_log files for CPanel accounts that are live use:

find /home/ -type f -name error_log -delete

To remove all error_log files from backups use:

find /backup/ -type f -name error_log -delete

This will take a while to complete because it will look through every file, it also runs pretty smooth so just sit back and let it work it’s magic.

 

1 thought on “How to remove error_log from all CPanel account and backups”

  1. I just used find /backup/ -type f -name error_log -delete command. However I do not see any results.. The putty application was just ready for another command without any result.
    Any suggestion ?

    Also can you share how do I check the files of users which are greater than a specific size ??

    Thanks!

Comments are closed.