Cleanup Downloads Once a Week

Here’s an easy way to keep your Downloads folder clean, just paste these this into your cron file (with the appropriate scheduling):

find ~/Downloads -type f -maxdepth 1 -mtime +7 -exec rm {} \;
find ~/Downloads -type d -maxdepth 1 -mtime +7 -exec rm -r {} \;

Here’s the gist: https://gist.github.com/fergbrain/8ddda2108dbc497e9f6b

I use Cronnix to manage and edit cron jobs on my Mac.

2 Replies to “Cleanup Downloads Once a Week”

  1. I actually like my downloads to be an archive of everything Ive downloaded. I know exactly where to look for that install zip of the exact version I used before. That being said, I also keep it clear of random downloads like pictures, temp documents, etc which is probably what you are using yours for.

    1. The goal is to prevent the Downloads folder from becoming a mess.

      Everything should have a place, including software I download (I have a separate place on my NAS for that).

Leave a Reply

Your email address will not be published. Required fields are marked *