There are many answers online on how to hide old events from iCloud calendars, but not many on how to actually delete them. From the settings, it appears to not be possible to do automatically. There may be, however, a command-line way to do it. I’m looking for something that doesn’t rely on AppleScript to call the Calendar app and doing it there, as I’ve gotten mixed results with such solutions, and would rather not invoke a GUI.
ICloud – Delete (not hide) calendar events automatically or via CLI
calendaricalicloud
Best Answer
Since iCloud is based on CalDAV, this shouldn’t be too hard. Deleting an event boils down to a simple HTTP request, e.g.:
This project on GitHub could serve as a good starting point: jcs/iclouddav