I'm getting frustrated with googl-ing, and can't find out how to delete/remove option groups.

Anyone have a simple answer? Even if I have to go into the DB and remove entries from civicrm_option_group - I just want to know that that is safe.

The groups have been created, but there are no fields, and therefore no data in them - but I can't see how to remove them.


The option groups were created via Administer -> system setting -> option groups and creating the fields, but as Ramesh says, below, there is no "delete" option here, so can't see where to remove them.

Background and workflow issue: I added the option groups because doing so through the Also, backing up Ramesh, groups self delete when they're not being used if they were created via the "adding Custom Data Set field" workflow. Although this names the data set as the question and doesn't give flexability to create re-usable names (the option set "name" is not change-able)


  • custom field (question)= Do you like fish and chips?

  • required option group options (Answer - radio): yes, no, sometimes

  • required option group name: sometimes

  • actual option group name: Do you use CivCRM?

  • actual option group to use: Do you like fish and chips

Should this last section rather be bought up in Jira (sorry if so - I saw it as a "cause" for the situation happening in the first place)

end edit

Anyone have some background on how these groups work / interact with the UI?

Thanks, Martin

Civi: 4.4.13 Drupal: 6

3 Answers 3


If it's safe (AFAIK if the option group isn't part of an extension or the core, doesn't contain any option values, isn't used by any custom fields) you can delete it using the API explorer or a drush command.

On the 'Option Groups' screen, each group has a link to its page of options, of the form https://www.example.org/civicrm/admin/optionValue?gid=94&reset=1 where the group ID is 94.

While logged in with privileges to the webserver directory, in sites/default, do:

drush cvapi OptionGroup.delete id=XX

Or go to civicrm/api/explorer, choose OptionGroup / delete, and add &id=XX (where XX is the group ID) to the end of what looks like a URL string below those options, and click Go.

  • will take a look at this shortly - looks perfect for me - thanks :)
    – Marsh
    May 20, 2015 at 8:40

Most of the option groups created by creating a custom field set of type radio / select / checkbox are created automatically.

Deleting the custom field, should also delete the option group IF its not being shared by any other custom fields.

Can you elaborate on how you create "orphaned" option groups


I have tested this - When you go directly to Administer -> system setting -> option groups we have an option of creating new option group this is where the problem is because we don't have a option of deleting the option group at this point and this is also not displayed in the list where we try to use this option group in custom field value

But any option group created using (select / ratio) while creating the custom field works alright

Your Answer

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

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