Gmail has a nice feature that permanently deletes e-mails after they've been in the Trash folder for 30 days. This is pretty clever, because if I don't need a trashed message back after 30 days it's very likely that I won't ever need it again.

I want to do the same for my Trash folder in OS X to make the best use of my disk space. Is there an easy way to automatically delete trashed files after 30 days?

Meta note: I don't think this is a duplicate of another thread because there the trigger is "disk space drops below X GB" and the effect is "the entire Trash folder is emptied". I only want to autodelete files older than 30 days.

  • There use to be a system preference pane Compost but that depended on a web site and that has gone – mmmmmm Mar 26 '16 at 21:08
  • The duplicate is because the answers in that question also answer yours ie Hazel and Compost are triggered off size and time and only remove what is needed (so strictly don't exactly meat the dups requirements ) – mmmmmm Mar 27 '16 at 8:28

This can be accomplished natively in macOS Sierra. Go into the Finder’s preferences, and on the “Advanced” tab pick “Remove items from the Trash after 30 days”.

Finder Advanced Prefrences

  • 2
    My question was posted before this feature was added, but this is the best solution now. Changing my answer! – Pieter Dec 4 '16 at 7:33

As mentioned in the linked thread, Hazel is a good option for this if you don't want to roll your own.

Specifically, it offers the option to delete those files that only have been left in the Trash greater than the time you've specified:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .