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). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). 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.

This module automatically deletes expired content based on its creation or modification date. You can configure cleanup rules per content type, setting retention periods and filtering by content status, with all actions logged during cron runs.

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
5 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.2 Stable Feb 5, 2026