Term Delete Protection
This module prevents taxonomy terms from being deleted if they are currently in use by content or other entities. It stops deletion attempts and warns users which content references the term, helping to maintain data integrity. The module can also protect parent terms if any of their child terms are referenced.
The Term Delete Protection module prevents taxonomy terms from being deleted
when they are referenced by content or other entities. This helps maintain data
integrity by ensuring that referenced terms cannot be accidentally removed.
The module automatically detects when terms are in use and:
- Removes the delete operation from term listing pages
- Blocks deletion attempts via the delete form
- Shows detailed warnings about which content is using the term
- Protects parent terms if any descendant terms are referenced
This module requires the following modules:
- Taxonomy (Drupal core)
Optional entity type support:
- Commerce Product module (if protecting commerce products)
- Paragraphs module (if protecting paragraphs)
- Groups (if protecting Groups)
- Custom Content Entities (if protecting Custom Content Entities. A custom content entity is the entity you get from drush generate entity:content my_custom_entity).
Installation
Install as you would normally install a contributed Drupal module. For further
information, see
[Installing Drupal Modules](https://www.drupal.org/docs/extending-drupal/installing-drupal-modules).
Configuration
1. Navigate to Administration > Structure > Taxonomy
2. Click "Edit" on the vocabulary you want to protect
3. Expand the "Term Delete Protection" section
4. Select which entity types to check for references:
- Enable term delete protection for nodes (always available)
- Enable term delete protection for commerce products (if Commerce installed)
- Enable term delete protection for paragraphs (if Paragraphs installed)
- Enable term delete protection for Groups (if Group installed)
- Enable term delete protection for Custom Content Entities.
5. Save the vocabulary
The module will now protect terms in that vocabulary from deletion if they are
referenced by the selected entity types.
Depends on
Dependencies of the latest stable release
- field Drupal core
- node Drupal core
- taxonomy Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 2.0.2 | Stable | 10–11 | Updated warning message text to accurately describe the visual indicator (yellow border instead of yellow background) | Apr 25, 2026 | |
| 2.0.1 | Stable | 10–11 | Improved CSS compatibility with dark administration themes | Apr 25, 2026 | |
| 1.0.1-beta3 | Pre-release | 10–11 | Support for content custom entities and bugfix for orphaned paragraphs. | Oct 17, 2025 | |
| 1.0.1-beta2 | Pre-release | 10–11 | Support for Group entities and better visual warning indicators. | Oct 15, 2025 | |
| 1.0.1-beta1 | Pre-release | 10–11 | Build gitlab pipeline fixes. | Oct 7, 2025 | |
| 1.0.x-dev | Dev | 10–11 | Oct 7, 2025 |