Find And Remove Old cPanel Backups

cPanel log locations

How do I find and remove old cPanel backups?

Use the following command from an SSH session to find all backups that are older than 60 days and delete them:

find /backup/weekly/incremental/accounts -maxdepth 1 -type d -ctime +60 -exec rm -rf {} \;

In the above example we find all weekly incremental backups that are older than 60 days and delete them.

You can change the folder location to suit your needs.

Please note: Be very careful to make sure you get the folder path right because it does not prompt you for approval and goes simply by age, so it does not know the difference between a backup folder and an unrelated folder.