(active tab)
Edit
Version control
View history
Maintainers
Star  All issues


This project is not covered by Drupal’s security advisory policy.

DB Cleanup helps Drupal sites automatically clean cache tables and watchdog (dblog) entries at configurable intervals. It is especially useful for sites running on shared or resource-restricted hosting environments.

Features
Key features include:

Automatically cleans watchdog (dblog) table at configurable time intervals.
Automatically clears cache_ tables* on a scheduled basis.
Optional OPTIMIZE TABLE execution after cleanup to reclaim space and improve performance.
Manual controls to immediately clear cache tables and watchdog entries from the UI.
Lightweight and cron-based, suitable for shared hosting and low-resource servers.
Simple configuration form integrated into the Administration → Configuration → Development section.
Use cases:

Drupal sites with limited database storage.
Shared hosting environments where database size grows quickly.
Sites where log tables are not cleaned frequently enough by default.
Developers who want predictable and controlled cleanup intervals.
Post-Installation
After installing and enabling the module:

Navigate to

Administration → Configuration → Development → Database Cleanup Settings
Configure:
Watchdog Cleanup Interval (hours)
Cache Tables Cleanup Interval (hours)
Enable or disable Optimize tables after cleanup
Save the configuration
The cleanup tasks will run automatically during Drupal cron execution.
Optionally, use Run Cleanup Now to manually clear cache tables and watchdog entries instantly.