Bulk Term Delete lets you delete many taxonomy terms at once. Select terms from a list, filter it to the terms nothing uses, check exactly what will be deleted, and confirm. Useful when cleaning up large or imported vocabularies, removing test data, or retiring old tags.

Features

  • A button where you need it: Bulk Delete Terms on each vocabulary's term list.
  • Select with checkboxes: all terms of the vocabulary in one table, indented by hierarchy, with a checkbox to select them all.
  • See what is used: a Used column shows how often each term is referenced from content or any other entity, published or not.
  • Find unused terms: filter the list to Only unused terms, or by name.
  • No surprises: the confirmation page lists the selected terms, the child terms that will be deleted with them, and how many references will point to deleted terms. Cancel returns to the list with your selection kept.
  • Any number of terms: deletion runs as a batch, so thousands of terms are deleted without a time-out.
  • Per-vocabulary permission: give editors the core Delete terms permission of one vocabulary, without Administer vocabularies and terms.
  • Logged: every deletion is written to the site log, with the user and the terms.
  • Drush: delete selected, unused or all terms of a vocabulary, with a dry run.

Requirements

  • Drupal 10.3 or later, or Drupal 11.
  • The core Taxonomy module.

Installation

Install as you would normally install a contributed Drupal module. For further information, see Installing Drupal Modules.

composer require drupal/bulk_term_delete
drush pm:enable bulk_term_delete

Permissions

No new permissions; the module uses the core ones:

  • Administer vocabularies and terms: bulk delete the terms of any vocabulary.
  • <Vocabulary>: Delete terms: bulk delete the terms of that vocabulary only. Give it together with Access the taxonomy vocabulary overview page.

Usage

  1. Go to Structure » Taxonomy and click List terms for a vocabulary.
  2. Click Bulk Delete Terms.
  3. Optionally, filter the list, for example to Only unused terms.
  4. Select the terms and click Delete selected terms.
  5. Check the confirmation page and click Delete.

Drush

# List the terms of Tags that nothing references.
drush bulk-term-delete:delete tags --unused --dry-run

# Delete them, some terms, or all terms.
drush bulk-term-delete:delete tags --unused
drush bulk-term-delete:delete tags --tids=4,5,6
drush bulk-term-delete:delete tags --all

Support

Report bugs and request features in the issue queue.

Supporting organizations: 

Project information

Releases