On MacOS...
As NoBoMac says, you can export the calendar in two ways. Native, and ICS. I'd do both, just to make sure 🙂
Then, either create a shortcut (probably easier!) or I have an old Applescript I wrote years ago, which probably still works.
set delDate to date the "01-01-2015"
set choice to display alert "Deleting old events" message "Will delete items earlier than " & date string of delDate buttons {"cancel", "Run"} default button "Run" giving up after 5
if button returned of choice = "cancel" then
error number -128
end if
set skipCalendars to {"Suggested Events", "Birthdays"}
set CalendarList to {}
set totalDeleted to 0
tell application "Calendar"
set everyCalendar to title of every calendar
repeat with i from 1 to count everyCalendar
if {everyCalendar's item i} is not in skipCalendars then set CalendarList's end to everyCalendar's item i
end repeat
repeat with myCal in CalendarList
tell calendar myCal
set theEventList to (events whose start date is less than delDate)
set eventCount to (count of theEventList)
if eventCount > 0 then
set choice to display alert myCal message "There are " & eventCount & " events prior to " & date string of delDate buttons {"cancel", "skip", "Run"} default button "skip" giving up after 5
if button returned of choice = "Run" then
repeat with theEvent in theEventList
delete theEvent
end repeat
set totalDeleted to totalDeleted + eventCount
else if button returned of choice = "cancel" then
error number -128
end if
end if
end tell
end repeat
display alert "Done!" message "Deleted " & (totalDeleted as text) & " old events" buttons {"OK"} giving up after 3
end tell