31

How to delete all events on many dates all at once but not the whole Calendar in Google Calendar? I tried to click on a date that got an event to delete and dragged my mouse to 2 days after that date, but then I always see "create an Event". I thought I could press backspace or delete to delete all those events.

What I did so far = deleting event one by one :(

2
  • There's nothing built-in that would let you do this. If there's an API for the calendar, it might be possible for someone to create an app to do this, but I don't know of any.
    – ale
    Jan 18, 2012 at 14:35
  • I had the same problem, so I made a basic app for Android as I was learning react native. It uses the google calendar API to search for events you want to delete. You can see the list of events it will delete, and then you can press "delete" to delete them all at once. orth.uk/how-to-delete-many-events-in-one-go-in-google-calendar Jun 6, 2020 at 12:31

6 Answers 6

39

I've been able to do this with a Google Script like this. You can alter this to pinpoint the days you want to delete, etc.

function delete_events()
{
    var fromDate = new Date(2013,0,1,0,0,0); 
    var toDate = new Date(2013,0,4,0,0,0);
    var calendarName = 'My Calendar';

    // delete from Jan 1 to end of Jan 4, 2013 (for month 0 = Jan, 1 = Feb...)

    var calendar = CalendarApp.getCalendarsByName(calendarName)[0];
    var events = calendar.getEvents(fromDate, toDate);
    for(var i=0; i<events.length;i++){
      var ev = events[i];
      Logger.log(ev.getTitle()); // show event name in log
      ev.deleteEvent();
    }
 }
5
  • Where do you enter this?
    – justintime
    Apr 10, 2014 at 22:00
  • 7
    Create a new script at Google Scripts and paste this in. Change the calendarName to the e-mail (GMail) address associated with the calendar. Jun 15, 2014 at 3:32
  • 3
    For the variable calendarName, mine didn't work for my MAIN calendar unless I used my actual full gmail address. When viewing this calendar name on the left side of my Google Calendar, it just showed up as my first and last name, but that didn't work for my calendarName variable. For my subaccount calendars, the calendar name shown at the left side of the calendars worked fine. I would get the following error message when I used the wrong calendar name, so if you see the message TypeError:Cannot call method "getEvents" of undefined.
    – Kurt
    Oct 24, 2014 at 2:12
  • 1
    (the above was edited from an answer turned into a comment. I thought this information might be useful, so I preserved it)
    – jonsca
    Oct 24, 2014 at 12:10
  • 1
    Thanks a lot for this! I accidentally batch imported 900+ events into my calendar, luckily in a future date range. This script helped me to batch delete the imported events. Feb 5, 2021 at 16:28
8

I found a modification that can make this script worthwhile if you want to look for certain events. That you intentionally or not imported. Lets say a lot of entry have Cycle 1 Checkpoint 10 in the name followed by a number or whatever. Be advised that "Cycle 1 Checkpoint 10", "Cycle 1 Checkpoint 20" will be found but "Cycle1 Checkpoint 10" not..

function delete_events()
{
  //take care: Date function starts at 0 for the month (January=0)
  //{search: 'cycle'+"*"+'Checkpoint'} hier zijn de search terms
  var fromDate = new Date(2014,7,1,0,0,0); //This is August 1, 2014
  var toDate = new Date(2016,2,1,0,0,0);   //This is March 1, 2016 at 00h00'00"
  var calendarName = 'GuyForssman';


  var calendar = CalendarApp.getCalendarsByName(calendarName)[0];
  var events = calendar.getEvents(fromDate, toDate,{search: 'cycle'+"*"+Checkpoint'+"*"});
  for(var i=0; i<events.length;i++)
  {
    var ev = events[i];
      Logger.log('Item '+ev.getTitle()+' found on '+ev.getStartTime()); // show event name and date in log
      //ev.deleteEvent(); //uncomment this line to actually do the delete !
  }
}
1
  • This extends the script above. Allowed me to delete a whole year curriculum in minutes, thanks Apr 10, 2019 at 15:58
5

After migrating from a previous calendar system to Google Apps, all recurring events were imported individually. I created a new Google Script at https://script.google.com and modified it to remove only some of the events (a new recurring event was already made with another name).

function delete_events()
{
  //take care: Date function starts at 0 for the month (January=0)
  var fromDate = new Date(2014,7,1,0,0,0); //This is August 1, 2014
  var toDate = new Date(2016,2,1,0,0,0);   //This is March 1, 2016 at 00h00'00"
  var calendarName = 'your_calendar_name';
  var toRemove = 'title_of_the_events';

  var calendar = CalendarApp.getCalendarsByName(calendarName)[0];
  var events = calendar.getEvents(fromDate, toDate,{search: toRemove});
  for(var i=0; i<events.length;i++)
  {
    var ev = events[i];
    if(ev.getTitle()==toRemove) //check if the title matches
    {
      Logger.log('Item '+ev.getTitle()+' found on '+ev.getStartTime()); // show event name and date in log
      //ev.deleteEvent(); //uncomment this line to actually do the delete !
    }
  }
}
2

Best thing I have found is using the mass delete function from the mobile app, Business Calendar Pro by Appgenixsoftware.

2

There is a free API client at http://www.gcaltoolkit.com. It has a network version that is free for 1000 entries and downloadable versions for Windows and Mac that may be free as well. I tried it and it worked quickly for me.

You can select by date or by search terms and it looks like you can manually modify that further. Or just click the ones you want to delete. After you decide, there is a button to commit your changes back to Google Calendar.

I found this very helpful when I had the same problem a few minutes ago and was surprised to see it wasn't on here.

-3

If you want to delete all the events in a calendar you can go to the calendar settings and delete the whole calendar.

If it's your main calendar it will delete all of its entries, and if it's another calendar it will delete the whole calendar therefore you will have to create a new one.

1
  • 2
    not the whole calendar. just 3 dates.
    – Arie
    Oct 3, 2011 at 23:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.