We've had a bit of a mix up and imported the same set of events twice. Most if not all of the duplicates have no participants (but I'm not 100% certain of that)

Is there a way to bulk delete these duplicates? I can't code but I can use sql a bit

I've seen this suggested: "DELETE from civicrm_event WHERE id=1". is that ok to use on multiple events? Is it ok to use if an event has participants?


  • Do you mean you have imported the events twice (title, description, date, location etc), or that you have imported a list of participants twice? How did you do the import?
    – Aidan
    Feb 23, 2018 at 8:49

2 Answers 2


General advice is don't use SQL directly - use the API. You don't have to write code if you use cv or API explorer.

  • woo hoo that API explorer is a thing of beauty.. wish I'd looked at that before.. thanks for the suggestion.. and a huge thanks to the people who built it
    – Robinnz
    Feb 24, 2018 at 5:14

If you know your ID then you would most likely use IN (1,5,7,etc)

  • thanks Pete.. is it Ok to delete that way if the event has participants?
    – Robinnz
    Feb 23, 2018 at 4:36
  • 1
    first delete the Participants via the UI or sql but be warned deleting via sql does not necessarily cascade down to remove all other related data eg Contributions or Activities related to the Participant registration
    – petednz - fuzion
    Feb 24, 2018 at 0:12
  • see Aidan's API answer for a better solution
    – petednz - fuzion
    Feb 25, 2018 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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