Cleanup Downloads Once a Week

The times they are a-changin’.

This post seems to be older than 5 years—a long time on the internet. It might be outdated.

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.

0

2 thoughts on “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).

Comments are closed.