Hard Drive – Automatically Empty Trash When Disk Space is Low

hard drivetrash

Sometimes my hard drive gets low on space, and various things don't work properly until I empty the Trash and free up some space. I know there are applications that empty the Trash after a set interval—but what I want is an app or script (or other means) to empty the Trash whenever there's e.g. less than 2GB of free space on a given hard drive.

Best Answer

I use a third party preference pane Compost that deletes from trash when the disk fills up or if the file has been in trash for a given time.

The original download stopped working for me but I have just found this on the author's site instead of the distributer. Note the author's comment

Compost is in a bit of a state of flux right now. The distributor has moved on to a different market and we wish them well in their endeavors. Additionally, the changes necessary to fully support Snow Leopard have been going through an extensive beta period as a result of the degree and complexity of changes required. Please stay tuned for more information.

So it might not work even from this download

When I updated this I had just installed it on Yosemite and it installed (but not enough time to see if it deleted anything) I have now updated to El Capitan and the installer fails.