[SOLVED] Delete all Calendar events for today

Other than creating a macro that deletes one event at a time until eventually some menu is not visible anymore and it cancels the macro, is there a way to delete all events at once, including recurring events? I tried Googling AppleScript and Shell suggestions, but can't seem to find anything related to it, at least not directly

The Calendar app does not provide any easy way of deleting lots of events at once, as far as I have ever managed to discover.

One thought: if all the events are in the same calendar [^1], deleting the calendar will delete the events.

[^1]: "Calendar" in the sense of "separate calendars for different areas of your life—work, home, school, and so on" as Apple puts it.

Deleting the calendar is not an option, though. It would be too much work, especially because I want to be able to delete events that are recurring, so that would delete them when deleting the calendar, which is not what I am trying to achieve.

I think I will have to rely on a repetitive macro then. No big deal.
Thanks anyway for your feedback!

1 Like

I think I understand what you are getting at there but cannot be sure. It may well be that "events" is as vague a term as "calendar". :slight_smile:

If you could give some concrete examples of what you want to do, that might provoke suggestions.

I see the title now includes "for today". Going more specific -- is this for just one calendar in Calendar, or all events in all calendars in Calendar? Events that start today, start and end today, does that include "all day" events?

@kevinb and @Nige_S
So basically all events happening today, whether they are only happening today (for example a meeting at a specific time), recurring (for example something I do every day such as taking the garbage out) or all day events without a specific time.

I've been deleting them manually by just selecting them and deleting. Recurring events show the warning if I want to delete just that event or all future events.

Basically I would like Calendar to have a feature that past events would just be deleted, for example events older than 2 days (or some other range we could pick). This is just an "OCD" type of thing for me, seeing all past events there.

Right now I have a macro that hits Tab to select the top event, then hit delete, then check if a certain menu item is available. If so, go to the next event, etc. But it's not working 100% and if there was a more stable way of doing it, even better.

I don't know about OCD; it seems like something that should be easy in a calendar! This might be of interest: How to View All Events as a List in Your Mac's Calendar App. I did something like this way back when I wanted to clear out lots of old entries.

Deleting items from that list of search results is not something I would want to automate since I can imagine things going wrong very easily.

You might want to try an alternative calendar application that has a true list view, such as BusyCal or Fantastical. I looked into this stuff some years back and got so fed up with it all that I just resolved to use a calendar less!

I'd start by taking out all the things that are actually "recurring todos", like doing the rubbish, and putting those into a todo app instead -- those usually do have the "tick it off, it disappears" feature that you're trying to emulate.

And one reason for that is:

Not really -- at least, not in most. Deleting discrete events isn't too hard -- find everything whose "end date" was more than 2 days ago (or whatever) and delete them. But, generally, recurring events are single events that are evaluated in context rather than a series of individual events -- you don't delete that "instance in the middle", you "hide" it. Eg, in Calendar, you add to the list of excluded dates for the event.

You could, I guess, reset the start date to be the day after your deletion horizon, but that's as difficult -- and more likely to have side effects -- as adding an exclusion. And finding which recurring events you want to hide will be difficult unless you go the brute force route of excluding every recurring event, regardless of whether they'd be due or not...

I said "should be". That's my opinion about the reasonableness of OP's ambition with a calendar application and nothing beyond that.

I agree (that's what I meant by "using a calendar less", rather than, say, just giving up!).

I never found a todo application (as such) that suited me but there are other alternatives too... Which "solution" will work for any user is very much a matter of personal need and style.

Since this is not a big deal and I like to stay in the Apple ecosystem as much as possible, adding another app just because of this feature that is "missing" wouldn't be enough of a reason for me to switch completely. I like what Calendar does and I use it pretty much just as a visual cue of what I have to do, outside of Todoist. Calendar for me is more like an app to see the actual blocks of time.

I used that example, just as an example. I don't add that type of "event" to Calendar. I use Todoist as my main task manager. Calendar is just a way to visually see the blocks of time I'm using, something Todoist doesn't do.

As I mentioned, if this can't be done easily with KM, no big deal. This is me just wanting to have a clean calendar without old events. So I will either have to tweak the macro I have now until it works 100% or I just face my "phobia" and live with the fact that past events are not the boogeyman...

I wasn't actually arguing, just using your statement as the lead-in as to why something that seems like it should be easy actually isn't.

Having had a play, AppleScript looks like it's a bust when it comes to finding "still visible" recurring events, making things tricky if you miss a day running the script.

Luckily, Shortcuts is able to find both normal and recurring events in a time period. It looks like you always have to manually confirm deletion, but that dialog should be KM-able -- as is the running of the Shortcut itself.

I'm a complete newb with Shortcuts and have no idea how (if!) you can export them like a KM macro. @iamdannywyatt -- I'm afraid you'll have to make do with a screen shot that you can use to build your own from. Most of the actions should be self-explanatory, except for 2, 3, and 5 which are the "Adjust Date" action, but note that I've limited it to events in the "Test Delete" calendar -- change that to something appropriate or remove it if you want to find events across all calendars.

1 Like

Unfortunately I'm stuck with Catalina, so I can't use Shortcuts yet. Thank you anyway for sharing that! I will save this topic for future reference when I upgrade my computer

Are your recurring events simple, like every day, or a bit more complicated like "every third day" or "first Monday of every month"?

Because you might be able to do this with AppleScript, simply bumping up the start date to "2 days before today" -- but I worried that might set a new "first day" for the complicated recurrences, breaking everything, so I didn't look into it.

1 Like

I have both "simple" and "complex" events.
But really, it's not a big deal. If it was a simple task, awesome. Since it's not, I will work on the macro I have. At the end of the day, even this macro will save me some time and work anyway.

I appreciate your time and help! :slight_smile:

1 Like

Here's the solution (finally)!!!
It deletes all non-recurring events and it deletes recurring events, just for the selected day, instead of "All"

Delete all Today's events.kmmacros (28 KB)

Here it is in action:
tiago-calendar-delete-all-evenets-keyboard-maestro

EDIT: TO make sure you don't accidentally delete the events (even though you can easily undo), I would add an alert before starting the process, like this:

image