By default in WHM this setting is set to “Disabled” which means that the content in .trash folder is kept indefinitely. To auto-delete content from the .trash folder for all cPanel users simply do the following:
Step 1. login to WHM and go to Tweak Settings (WHM >> Home >> Server Configuration >> Tweak Settings)
Step 2. select “Age, in days, of content to purge from users’ File Manager Trash ” and select the number of days (i.e., 30)
Step 3. Scroll down to the bottom of the page and click on “Save“.
That’s it, now this script will run and auto delete content from users’ .trash folder each night. You can also trigger the script manually when needed:
/urs/local/cpanel/bin/empty_user_trash