This question already has an answer here:

I discovered this post How can I set up Ubuntu 16.04 LTS to automatically empty the trash based on parameters?

Does autotrash itself runs automatically?

If not, how to config it?

marked as duplicate by thomasrutter, Eric Carvalho, user68186, Community Jan 23 '18 at 1:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Looking at the project sources and README.md up on Github, you'll read that in order to run this Python script regularly, you can either:

  • Create a crontab entry with some regular interval (e.g., @daily /usr/bin/autotrash -d 30)
  • Add it to the Startup Application program so autotrash can run every time you boot your system.

For additional configuration details, refer to the Ubuntu Manpage for autotrash.


You can do it in the old fashion way with Terminal,

$ sudo crontab -e

Add these lines in the Crontab,

@reboot find /home/yourname/.local/share/Trash/expunged/ -type f -mtime +30 -exec rm {} \;

@reboot find /home/yourname/.local/share/Trash/files/ -type f -mtime +30 -exec rm {} \;

@reboot find /home/yourname/.local/share/Trash/info/ -type f -mtime +30 -exec rm {} \;

The -mtime is set to 30 days. The commands above will check and delete files that over 30 days old at system startup. Hope this will help.

Not the answer you're looking for? Browse other questions tagged or ask your own question.