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
Project information
- Project categories: Content editing experience, Developer tools
360 sites report using this module
- Created by j-barnes on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.
Releases
Development version: 1.0.x-dev updated 13 Mar 2026 at 16:05 UTC

