Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
AppleScript to delete all reminders more than 30 days old.
set remindersOpen to application "Reminders" is running
set monthAgo to (current date) - (30 * days)
tell application "Reminders"
set myLists to name of every list
repeat with thisList in myLists
tell list thisList
delete (every reminder whose completion date is less than monthAgo)
end tell
end repeat
if not remindersOpen then quit
end tell

This comment has been minimized.

Copy link

LunnSon commented May 8, 2018

Excuse my ignorance but how would you execute this script?


This comment has been minimized.

Copy link

ericharley commented Jun 5, 2018

Copy/paste the script into the "Script Editor" application (Applications -> Utilities), press play.

Or you could save this to a file, "Purge Old Reminders.scpt," and then from Terminal use the command line program osascript,

osascript "Purge Old Reminders.scpt"

You'll be asked to grant Terminal permission to access your Reminders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.