Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MacularDegenerate/466f7446176ba93708a1725cb6ef1a06 to your computer and use it in GitHub Desktop.
Save MacularDegenerate/466f7446176ba93708a1725cb6ef1a06 to your computer and use it in GitHub Desktop.
Delete all Reminders from the "Completed Archive" list
// listsToClear: defines the iOS reminders list(s) from which completed reminders will be removed. Additional lists can be added to this this array if you wish.
let listsToClear = ["Completed Archive"]
for ( j = 0; j < listsToClear.length; j++ ) {
let reminderList = listsToClear[j]
let cal = await Calendar.forRemindersByTitle( reminderList )
let reminders = await Reminder.all( [cal] )
for( var i = 0; i < reminders.length; i++ ) {
let reminder = reminders[i]
console.log( reminder.title )
reminder.remove()
}
}
Script.complete()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment