Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Revision Delete Tools

276 sites Security covered
View on drupal.org

This module offers Drush commands to efficiently delete large numbers of entity revisions in bulk. It uses a queue system to process deletions without consuming excessive memory, allowing you to specify which entities and how many revisions to keep.

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
1 year ago
Releases (12 mo)
0 ▼ from 3
Maintenance
Dormant

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