FREE! Plan Your Ideal Week: Bonus Workshop + Planner  →  Get the Workshop

How to Automatically Clean Up Your Desktop With Hazel

If you’re anything like me, your desktop gets cluttered with screenshots, random documents you wanted easy access to, and (above all) duplicate files! Thankfully, there’s a program out there that can help people like me handle this automatically, and it’s called Hazel. I’m going to walk you through my setup here, which you can customize to meet your needs, of course.

Remove Old Screenshots from the Desktop

First of all, let’s tackle screenshots. Personally, I prefer to leave my screenshots on my desktop for an hour, and then dump them into Dropbox if they’re still around. This means that regardless of which device I take the screenshot on, I will be able to find it if I need it later in the week. But if I have already moved it or deleted it, then it won’t be in the general screenshot folder.

Hazel move screenshots rule

Start by adding your Desktop to the list of folders Hazel monitors, and then add a rule. In this rule, we want to add three conditions:

  • Name contains Screenshot
  • Date Added is not in the last 1 hour
  • Kind is Image

This is going to find any images with “screenshot” in the name that were not put on the desktop in the last hour (so if we move an old screenshot to the desktop for some reason, it won’t instantly disappear). We just need one action that Hazel will complete if these conditions are true:

  • Move to folder Screenshots

In my case, I have a folder called Screenshots in Dropbox where I like all of my screenshots to go, and I selected this through the Other… option in the list.

Move Old Files Off the Desktop

Next up are the random files that litter my desktop. These can be split into three groups: PDFs, Images, and everything else, which includes anything from Pages documents to ZIP files. I move PDFs to my documents folder after 2 hours and import images into my Photos Library.

These rules are very similar to one another, so I’ll explain them together. The conditions are:

  • Kind is PDF or Kind is Image (hopefully you can guess which one applies to which!)
  • Date Added is not in the last 2 hours

Move PDFs to Documents folder

Import images to Photos Library

Where they differ is in the actions they execute. PDFs are moved to the Documents folder, and Images are imported into Photos under a default album called Library.

Everything Else

This leaves us with the last category: everything else.

Everything else!

I configured my system to give me 24 hours to handle everything else on my desktop, but once that 24 hours is up, these files are moved to the trash. I’ve accomplished this with two conditions:

  • Any File
  • Date Added is not in the last 1 day

And then there’s one action which is run:

  • Move to Trash.

In the Hazel overview I’ve made sure my rules are ordered by the amount of time to wait, so the screenshots are first, images and PDFs second and third, and the Everything Else rule is last.

An overview of all Hazel rules

On top of this, I’ve ticked the box to throw away duplicate files, which handles the worst offender straight off the bat. If I search for the file on my desktop, I’ll still find it. On the odd occasion I need to duplicate a file, I can still do that and rename the copy before Hazel kicks in and deletes it.

Have fun making Hazel clean your desktop for you! You can download the rules here directly to modify and configure to your taste: Desktop.hazelrules.