I just ran out of disk space and I have like 15GB in my trash. Is there a way to not keep items older than say 7 days or limit the size of the Trash?
I need a way to automatically keep this managed.
The Trash is just a special folder (directory) that Apple creates and manages via the Finder so that you have some ability to easily "undelete" items (by removing them from the Trash) before you full-on delete (Empty Trash). Since this mechanism is just a directory on your startup disk, you technically have your entire startup disk's space to use up for Trash if you wanted to.
If you wanted some measure of "auto-magical" removal files older than 7 days, you can use a simple bash script:
Using your favorite text editor, paste the above line into a new file and then save the file as
This command, when executed in the terminal, will find all the files in your Trash (files from your Startup volume only --more on this in a minute) that are older than 7 days (from the time you run this command) and pass each file to the
You could then use cron (if you are unfamiliar with Cron, check out the fine Cron entry on wikipedia) to setup a recurring execution of this script.
Personally, my vote is to just train yourself to use the
P.S. if all this unix-ese is too frightening, I'd wager there are simple Mac Applications that people have written to do just this sort of thing. Hopefully someone with some knowledge of one ore more of these types of applications can offer up an answer or two as a counter balance.
P.S. I forgot to talk about the non-startup volume... If you delete a file from a volume OTHER than your startup volume, this file will go to the .Trash folder on that volume. For example, if you had a volume named
Hazel can be configured to both keep files only for a certain amount of time and to keep the trash under a certain size. You could also add custom rules for deleting large files immediately or deleting files in the trash folders of other volumes.