Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Content Cleaner

No security coverage Drupal 9–11
View on drupal.org

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

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Feb 2026
Latest release
6 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
1.0.2 Stable 9–11 Feb 5, 2026