Install autotrash by entering the following commands in the terminal:
sudo apt update sudo apt install autotrash
purges files from your trash based on age and/or filename
A script useful to purge files from your trash based on their age. It can also be used to purge the files based on the filename using a regular expression.