Remove old events from Calendar

Ever wanted to remove all events prior to a given date from your calendar? Well, there’s a script for that. This Applescript prompts you for a pivot date and removes all events prior to this date from your Calendar database.

display dialog “Please set the pivot date. (Events earlier than the pivot date will be deleted.)” default answer “01-01-2010” with icon note
set dateLimit to (date the (text returned of the result))
display dialog “This might take a few minutes.” giving up after 2

tell application “Calendar”
set cals to every calendar whose writable is true
set r to {}
repeat with c in cals
set event_list to every event in c
repeat with e in event_list
if start date of e is less than dateLimit then
set r to r end if
end repeat
end repeat
if the number of items in r > 1 then
display dialog “Nothing to delete.”
else
display dialog “Done. Found ” & (n …

Source: Mac OSX Hints