Using Views Bulk Operation to delete orphan taxonomy terms (Terms that have no nodes associated with them)

Deleting orphan terms especially in a free tagging vocabulary is reasonably common task for site administrators. Orphan terms in this case means taxonomy terms that are not used by any nodes (content pieces). I had to look up various issue queues for this and found this in the issue queue of the term node count module. If interested here is the link to the page #603868: Rework Term Node Count for D7
Steps to get this working:

  1. Create a new view. Name it anything you want.
  2. Display: choose taxonomy term. If you want to delete orphan tags from a particular vocabulary, choose the vocabulary. Add the page title etc and click create and edit to move to the next page
  3. In the section Relationships choose "Taxonomy Term: Content with Term" from the list of options. Leave the default identifier "node" or choose a descriptive label if you wish.
  4. In the Fields section add Content: nid and Bulk Operations: Taxonomy Term. Label the Content: nid field with a descriptive label such as "node count". For the Bulk Operation field type in label as "select" . Ensure enable select all items and display processing result are checked . In the selected operation choose the delete operation. Check the delete without confirmation if you want to delete the terms without an intermediate confirmatory dialog page.

Glossary

This glossary describes terminology and acronyms used in the Drupal project and by the Drupal community. These terms are not (typically) specific to any version of Drupal. However, Drupal 8 introduces a broad swathe of new concepts, terms and acronyms. See Drupal 8 Background & Prerequisites for an initial list.

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

A

action #
A function that operates like a stored procedure. The function parameters, if any, are stored in the database and the function is executed by retrieving these stored parameters and calling the function.
anonymous #
A visitor to a Drupal website who is not currently logged in. Drupal considers any such visitor as being the anonymous user, with the user ID 0, and belonging to the anonymous user role.
API #
Subscribe with RSS Subscribe to RSS - Terms