Cleanup
Sandboxes are disposable by design. Rudel provides both automatic and manual cleanup mechanisms to prevent disk usage from growing unbounded.
Manual cleanup
Remove sandboxes older than the configured max_age_days:
wp rudel cleanupPreview what would be removed without actually deleting:
wp rudel cleanup --dry-runOverride the configured max age:
wp rudel cleanup --max-age-days=7Combine dry run with a custom age to see which sandboxes are older than 7 days:
wp rudel cleanup --dry-run --max-age-days=7Configuration
Cleanup behavior is controlled by the Rudel configuration file (rudel-config.json in the wp-content directory):
| Setting | Description | Default |
|---|---|---|
max_sandboxes | Maximum number of active sandboxes (enforced at creation time) | 0 (no limit) |
max_age_days | Sandboxes older than this are eligible for cleanup | 0 (disabled) |
max_disk_mb | Maximum total disk usage for all sandboxes in MB (enforced at creation time) | 0 (no limit) |
The max_age_days setting is enforced during wp rudel cleanup. The max_sandboxes and max_disk_mb limits are enforced when creating new sandboxes, not during cleanup.
Cleanup behavior
When wp rudel cleanup runs:
- If
max_age_daysis 0 (the default) and no--max-age-daysoverride is provided, cleanup returns immediately with no removals. - Sandboxes older than
max_age_daysare removed. - Errors during removal are reported but do not stop the cleanup process.
The --dry-run flag shows what would be removed without making changes, so you can verify before committing.