It would be very useful, and supposedly extremely simple to code, to have a little checkbox in the manager that would allow deleting all categories within that vocabulary. I often need to do this while importing sites and the only thing I can revert to is deleting them directly from the database or deleting and re-creating the whole vocabulary..




momper’s picture


is there a possibility to delete all terms of a vocabulary at once?

thanks momper

wwwoliondorcom’s picture

Or maybe juste delete the orphans terms ? (without a node)


Francewhoa’s picture

+1 for this feature in Taxonomy Manager.

@wwwoliondorcom: The module 'delete_orphaned_terms' can do that http://drupal.org/project/delete_orphaned_terms

The down side of delete_orphaned_terms is that it might run out of memory with very large taxonomy.

giorgio79’s picture

zoo’s picture

Hello developers and thank You for this precious module!

I also agree the feature requested would be very helpful.



scotjam’s picture

Version: 5.x-1.0 » 6.x-2.2

I'm interested to know if its possible to selects all terms of a vocabulary at once. I too am looking for a quick way of deleting all terms.


scotjam’s picture

Found an interim solution. Use firefox together with add-ons (either)

1. CheckFox https://addons.mozilla.org/en-US/firefox/addon/2393/ (tested and it works)


2/ CheckBoxMate https://addons.mozilla.org/en-US/firefox/addon/9740/ (doesn't work on my firefox version)

Hope this helps

zoo’s picture

Hello scotjam,

I don't have right now the time to try your solution but I just wanted to thank you for sharing, this is support! well done.



drupaldev@assyst’s picture

I think following code will help you.

$tree = taxonomy_get_tree($vid);
foreach($tree as $key => $val){

Max_Headroom’s picture

taxonomy_term_delete is only from Drupal 7.

mery28’s picture

I'm using "Generate terms" from the Devel module (in drupal 7). I generate 0 terms and check "Delete existing terms in specified vocabularies before generating new terms."

quickly’s picture

#13 works great! Thanks @mery28 for the clever solution

Taxoman’s picture

Version: 7.x-1.x-dev » 6.x-2.2

Isn't there also a need to clean up the nodes that are using the terms before removing terms?
It would be great with:

a) DETECT (first) and LIST all current nodes that point to taxonomy terms that are missing (gone/already deleted), with options to either re-create the term, update the nodes to drop that term(s), or replace the orphan term pointer with a new (existing, or created-on-the-fly) term...

b) possibility to delete all terms in a vocab, with option to skip terms already used by nodes, or auto-update all affected nodes with either removing that term, or replacing it with another term. (All such node updates should be done without affecting the updated timestamp of the affected nodes.)

c) DETECT (first) and LIST all orphaned taxonomy terms, and then be allowed to delete all or some of those, and/or option to re-attach (some of) them, either to new parent with original name (create on-the-fly), or new parent with new name

d) option to delete all nodes that fits a multi-term filter (or offer a UI for that, with a dependency on Views_Bulk_Operations, which then can provide even more options as of what to do with those nodes)

(These features will make this module truly live up to its name; "T... MANAGER"...)

(PS. sometimes "orphaned" reflects child terms with missing parents in hierarchical vocabularies, not only terms that are not used by any nodes)

Taxoman’s picture

Version: 6.x-2.2 » 7.x-1.x-dev
mh86’s picture

Version: 6.x-2.2 » 7.x-1.x-dev

Well, not only nodes can have terms associated with (which makes this topic more complex).
If you are interested in a "select all" functionality, please take a look at #1301094: Taxonomy Manager: Add a 'Select all' feature.

sa3z’s picture

#13 worked great for me as well. Thanks Maria!

kenorb’s picture


drush -v eval 'foreach(taxonomy_get_tree(123) as $term) { taxonomy_term_delete($term->tid); }'
Summit’s picture

Hi, #13 was great! saved me from all that clicking, thanks!
greetings, Martijn

firebird’s picture

I've created a module for this: https://drupal.org/project/taxonomy_delete_all_terms .

If the developers of Taxonomy Manager want to merge the functionality of Taxonomy Delete All Terms to their module, I can make mine obsolete.

afinnarn’s picture

Issue summary: View changes

I think this is a good idea to move https://drupal.org/project/taxonomy_delete_all_terms into the module.

jeetendrakumar’s picture

You can also use https://www.drupal.org/project/taxonomy_multidelete_terms module to delete taxonomy terms.

rooby’s picture

I see no reason why you should have to use another module since this module is supposed to handle taxonomy management tasks.

It could work similarly to views bulk operations where if you use select all you then get an option to select all on all pages.