Automatically Delete Completed Reminders on a Mac
One of my new year’s resolutions is to try Apple’s Reminders app to make it easier for me to handle my daily to-do list. What I love about Apple’s Reminders app is that it syncs across my Mac, iPhone, iPad, and Apple Watch using iCloud so that my to-do list is always within reach. Additionally, Siri makes it easy to add new reminders to my to-do list (it also works with HomePod for people who own one). I also love how easy it is to schedule reminders so I can easily focus on the day’s tasks at hand without rabbit-trailing to other day’s tasks, as Matthew 6:34 reminds us to: “Take therefore no thought for the morrow: for the morrow shall take thought for the things of itself.”
The only thing I don’t care about Apple’s Reminders app is that Apple does not offer a feature to automatically delete completed reminders. I don’t want my app clogging up with hundreds or thousands of completed reminders over the years.
There is a way to set your Mac to automatically delete completed reminders on a schedule of your choice. You can use AppleScript, Apple’s long-standing built in easy-to-program language, to create a script that deletes completed reminders, then run it on a schedule with a few Terminal commands.
First, you’ll go to Script Editor. On macOS Tahoe, it’s in the Utilities folder.
In Script Editor, add the following script code:
tell application “Reminders”
activate
delay 1
set completedReminders to (every reminder whose completed is true)
repeat with r in completedReminders
delete (contents of r)
end repeat
end tell
You’ll hit the Compile button (hammer), then save it as DeleteCompletedReminders.scpt in your user folder (the one with your user name on it) and creating a folder inside there called Scripts (go to File>New Folder to create the folder if it’s not already there).
Next, to use Terminal to run the AppleScript on a schedule.
Open Terminal (it is also in the Utilities folder on macOS Tahoe).
Run this command:
nano ~/Library/LaunchAgents/com.userfolder.deletecompletedreminders.plist
Replace userfolder with your Mac’s user folder name.
Paste this exact text below in there, but replace userfolder with your Mac’s user folder name.
<?xml version=”1.0” encoding=”UTF-8”?>
<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN”
“http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0”>
<dict>
<key>Label</key>
<string>com.userfolder.deletecompletedreminders</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/osascript</string>
<string>/Users/parkernathan/Scripts/DeleteCompletedReminders.scpt</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>15</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
This script will run at 3PM (since that is generally a time I am at my desk with Reminders open). If you wish to run the script at a different time, you can replace
<key>Hour</key>
<integer>15</integer>
<key>Minute</key>
<integer>0</integer>
with the hour and minutes of your choosing (you will need to specify the hours and minutes using 24 hour time).
You’ll then need to load the script to allow the schedule to fire. Enter this into Terminal (replace userfolder with your Mac’s user folder name):
launchctl load ~/Library/LaunchAgents/com.userfolder.deletecompletedreminders.plist
You’ll next need to go to System Settings, then Users & Privacy and make sure under Automation that Terminal is set to control Reminders. Also look under Reminders in Users & Privacy to ensure that Terminal is set to allow access to Reminders. I also recommend adding Terminal to Full Disk Access under Users & Privacy. Apple should prompt you to allow this and to allow osascript to control Reminders automatically when setting this up. If you are not prompted for it, run this command in Terminal:
osascript -e ‘tell application “Reminders” to get name of every list’
You should now be prompted to allow Terminal or osascript to control Reminders.
Your Mac will now automatically delete Reminders on a schedule!
If at any time you need to unload the script, run the following command in Terminal (replace userfolder with your Mac’s user folder name):
launchctl unload ~/Library/LaunchAgents/com.userfolder.deletecompletedreminders.plist
To remove the script scheduler, run the following command in Terminal (replace userfolder with your Mac’s user folder name):
rm ~/Library/LaunchAgents/com.userfolder.deletecompletedreminders.plist
Then go back to your user folder and remove DeleteCompletedReminders.scpt from your Scripts folder.
I’m also attaching the instructions as a PDF.
.

