You are here

26 March 2018

Delete all terms from all vocabularies in Drupal 7. This is ran by Drush, but you can run it from wherever Drupal is initialised.

Source code viewer
  1. drush -v eval '$vocabularies = taxonomy_get_vocabularies(); foreach($vocabularies as $vocabulary) { foreach(taxonomy_get_tree($vocabulary->vid) as $term) { taxonomy_term_delete($term->tid);}}'
Programming Language: Bash