Drupal is a registered trademark of Dries Buytaert

revision_delete_tools

124 sites Security covered
View on drupal.org

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
9 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