Howto: Undo iCal import in Google Calendar

Written by Tom Verhoeff on. Posted in Eveoh

Imagine this situation: you just imported your full schedule for this semester into your main Google Calendar when you decide make some changes to your courses or want to switch to an iCal feed. In this and many other cases it would be nice if Google provided any form of undo import option. Unfortunately there is no automated way of doing this just yet, so manually deleting all events seems to be the only option. Somebody came up to me today asking if there is any way of solving this problem, so i figured something out. All you need is the original ics file and a simple text editor. To get started open up your ics file in a simple text editor. On windows built-in notepad would work, but i prefer Notepad++. You will notice that an ics file basically consists of a long list of data for all events in the file. We need to trick Google Calendar into believing that all the events are cancelled. The iCal format contains a lot of parameters, one of them is the “Status” parameter. Usually in ics files this is set to confirmed. We will use this status to trick Google Calendar.
  1. Open the find/replace function
  2. Replace all occurrences of “STATUS:CONFIRMED” to “STATUS:CANCELLED”
  3. Save the file
  4. Re-import the file to the same Google Calendar
By design Google Calendar will now update all activities with the new status. In this case it means all events get a “Cancelled” status and will therefore be removed from your calendar. Problem solved! If you encounter any problems it might help to also increase the sequence number. In this case replacing “SEQUENCE:” with “SEQUENCE:99” should to the trick. Please let me know if you encounter any other problems.

Tags: , , , , , , , , ,

Trackback from your site.

Comments (133)

  • Ellen

    |

    Figured it out. Used the stacked info w/o forward slash n and it worked.

    God send!

    Reply

  • Katia Barretto

    |

    Worked for me BUT May 5 to July 5 2016 entries suddenly all gone 🙁 how do i fix this

    Reply

  • jp

    |

    OMG! THANK YOU

    Reply

  • JLS

    |

    Excellent solution!

    Reply

  • Mary

    |

    Perfect! Thank you.

    Reply

  • Merel

    |

    My problem is still there: I imported an ical-URL into my work calendar. I would only like to delete those items but keep the rest. This works the same as just deleting al the calendaritems one by one from my calendar, right? I can’t find a code in the sequence that is the same in all the wrong items…

    Hope you can help

    Reply

  • Av

    |

    Thank you so much for this clarification!!! I was having trouble figuring out how to get the find and replace function to recognize the \n !!! Thank you!

    Reply

  • Nicholas

    |

    This worked perfectly for me, and saved me a ton of time. Thanks!

    Reply

  • Muzammil

    |

    I have imported the wrong files and now it is showing all events 2 times!!
    I am expecting to undo the recent import.

    Reply

  • Liz

    |

    THANKS! This worked like a charm.

    Reply

  • Alin

    |

    I imported my birthdays from Facebook, but realised there are too many. I tried changing the status from Busy to Cancelled, and reimporting the ics file, but no luck. Any ideas?

    Reply

  • Cassidy

    |

    THANK YOU!!!!!!!!!!!!!! THIS SAVED M Y LIFE

    Reply

  • Krista

    |

    Thanks! This worked great!

    Reply

  • VT

    |

    WORKS FOR ME THANKS

    Replaced
    END:VEVENT

    with
    STATUS:CANCELLED
    END:VEVENT

    Reply

  • Kim

    |

    It doesn’t seem to work anymore 🙁

    Reply

  • Aida

    |

    I am having the same issue. I’ve tried several things already I’ve seen suggested in the forums. Now, with changing the BEGIN/VEVENT to BEGIN:VEVENT\nSTATUS:CANCELLED, i get the same error message as you:

    “Processed zero events. Failed to import events: Unable to process your iCal/CSV file..”

    Oh this is a nightmare for no reason. How are there google self-driving cars, Google buses for employees, and google assistants, but no undo-import function or simple fix for this in 2017?!

    Reply

  • Matthew Graham

    |

    This was super helpful! The only thing that tripped me up was that the “\n” This means a new line must be added, not that the “\n” text should be added.

    Find:
    BEGIN:VEVENT

    Copy this into the Replace Field:
    BEGIN:VEVENT
    STATUS:CANCELLED

    DON’T copy this into the replace field: BEGIN:VEVENT\nSTATUS:CANCELLED

    Thank you James!

    Reply

  • Martin

    |

    Great!
    Worked for me. Use Notepad++ and tick the “\n” Option in replace mode.

    Find:
    BEGIN:VEVENT

    Replace Field:
    BEGIN:VEVENT\nSTATUS:CANCELLED

    Re-import .ics file into Google calendar.

    Saved me a lot of time!

    Reply

  • jOE

    |

    Great solution. My iCal file did not have a STATUS line so needed to be added as “STATUS:CANCELLED”. Basic Notepad or Wordpad won’t add a line during Find/Replace so Notepad++ or other editor such as MS Word used as long new file saved in text only format and file extension changed from “.txt” to “.ics”. (Suggest saving to a new file name so original file is unchanged in case having to start over again.) Also note that the SEQUENCE number increments each time the event is changed so may not update with the new import if the SEQUENCE number has not changed. (Author suggested changing the SEQUENCE number to 99 may be necessary.)
    Many thanks to Tom! Posted it 6 years ago and it is still relevant today.

    Reply

  • Richard

    |

    BRILLIANT! Worked great! Followed the instructions just as suggested and BOOM! All 568 events that I mistakenly imported were all gone ! Thank you !

    Reply

  • Jitesh

    |

    I used Sublime Text to do this on the Mac.
    Worked perfectly.

    Thanks!

    Reply

  • Nicole

    |

    Where is the find/replace function?

    Reply

  • Mike

    |

    Thanks so much! saved me a lot of hassle!

    Reply

  • Fugue

    |

    What a clever solution! Thanks for saving me from getting panicky because of possible removing all the mistakenly added events to my precious main calendar.

    Reply

  • Sarah C

    |

    Thank you SO MUCH!!!! I would have screwed up my Work calendar and I figured it out for Mac in Text Editor. THANK YOU! 🙂

    Reply

  • ramp

    |

    This is such an elegant and cool and beautiful solution!

    Reply

  • David

    |

    This is very helpful. Thanks to Matthew Graham. I solve it by his solution.

    Find:
    BEGIN:VEVENT

    Copy this into the Replace Field:
    BEGIN:VEVENT
    STATUS:CANCELLED

    DON’T copy this into the replace field: BEGIN:VEVENT\nSTATUS:CANCELLED

    Thank you Matthew Graham!

    Reply

  • Janis Davisson

    |

    This worked, thank you, thank you, thank you, thank you, thank you!!!!!!!

    Reply

  • Susan Thompson

    |

    OMG, THANK YOU SO MUCH!! I had to monkey around with the various suggestions – ended up using the replacement of:
    BEGIN:VEVENT
    STATUS:CANCELLED
    … however, since I couldn’t figure out how to replace WITH a carriage return, had to manually type this in myself… 135 times!
    But it was WELL worth not having to delete 135 calendar items individually!

    Reply

  • Bart

    |

    Thank you so much for this solution, it worked perfectly!!

    Reply

  • Rafa

    |

    This trick appears not to be working anymore…

    Reply

  • Michael

    |

    Does this still work? It saved me a while ago, but it’s not working now…

    Reply

  • Mike

    |

    had to do the \n trick and mess about a bit in notepad++ (love that program) and finally got it to work after 2 or 3 tries. Be sure to save the original file before modifications. In my case I added all the data to the main calendar and just muddied it up too much. I removed all the entries with the modified file, added a calendar and imported all the entries into the new calendar so I can turn on/off. Works great. Thank god for people with intricate knowledge of complicated things!

    Reply

Leave a comment