Drupal is a registered trademark of Dries Buytaert

content_cleaner

1 sites No security coverage
View on drupal.org

CONTENT CLEANER
Automatically clean up expired content based on date fields and configurable rules.

DESCRIPTION
The Content Cleaner module provides an automated solution for managing content lifecycle in Drupal. It automatically identifies and deletes expired content based on standard Drupal date fields (created/changed), helping maintain a clean and relevant content repository.

Perfect for:
* Event-based websites that need to remove past events
* News sites managing article archives
* Temporary promotional content
* Any content with time-based relevance

FEATURES
* Per-Content-Type Configuration: Independent settings for each content type
* Standard Date Fields: Uses built-in `created` and `changed` dates - no custom fields needed
* Flexible Retention Periods: Set retention from 1 week to 2 years per content type
* Status Filtering: Delete all, published only, or unpublished only content
* Timezone Support: Configurable timezone for accurate date calculations
* Comprehensive Logging: All cleanup operations logged to Drupal's watchdog
* Automatic Cleanup: Runs during cron execution

REQUIREMENTS
* Drupal: ^9 || ^10 || ^11
* PHP: 8.0+

INSTALLATION

    composer require drupal/content_cleaner
    drush en content_cleaner -y

CONFIGURATION
Navigate to Configuration > Content authoring > Content Cleaner
(`/admin/config/content/content-cleaner`)

Each content type has independent settings:
* Enable: Activate cleanup for this content type
* Date Basis: Use created or changed date
* Retention Period: How long to keep content
* Status Filter: Which content to clean (all/published/unpublished)

USAGE
Content cleanup runs automatically during cron. Monitor via:

drush watchdog:show --filter=content_cleaner

SUPPORT
* Issue queue: https://www.drupal.org/project/issues/content_cleaner
* Documentation: Full README in module package

MAINTAINERS
* tchida - https://www.drupal.org/u/tchida

Activity

Total releases
1
First release
Feb 2026
Latest release
3 weeks ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
1.0.2 Stable Feb 5, 2026