Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

This module provides efficient Drush commands for bulk deletion of entity revisions while optimizing performance through a queue system. It supports different entity types and provides revision cleanup without excessive memory usage.

Features

By default, the commands retain the latest three revisions unless a custom --keep value is specified. You can target specific entities, process all revisions across a given entity bundle or type.

Available Commands

Queue revisions for all revisionable entities:
drush rdt:remove-revisions

Queue revisions for all entities of the specified type:
drush rdt:remove-revisions node

Queue revision deletion for all "page" nodes, keeping the last 5 revisions:
drush rdt:remove-revisions node page --keep=5

Queue revision deletion for a specific node (ID 123) under "page":
drush rdt:remove-revisions node page 123

Queue revision deletion for a specific media entity (ID 123) under "image":
drush rdt:remove-revisions media image 123

Why?

In scenarios where a single entity accumulates tens of thousands of revisions, traditional cleanup methods can cause memory exhaustion when attempting to load all revision IDs at once. This module addresses that issue by processing deletions one entity at a time via a queue and chunks revisions, significantly reducing memory consumption.

Additionally, it supports both node and media entity revisions, providing a more flexible and scalable solution for managing revision bloat.

Related Modules

  • Revision Manager - Full-featured revision management with UI, retention policies, and automated cleanup scheduling

Activity

Total releases
3
First release
Feb 2025
Latest release
10 months ago
Release cadence
51 days
Stability
0% stable

Release Timeline

Releases

Version Type Release date
1.0.0-beta3 Pre-release May 20, 2025
1.0.0-beta1 Pre-release Feb 7, 2025
1.0.x-dev Dev Feb 7, 2025