Rudel
Features

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 cleanup

Preview what would be removed without actually deleting:

wp rudel cleanup --dry-run

Override the configured max age:

wp rudel cleanup --max-age-days=7

Combine dry run with a custom age to see which sandboxes are older than 7 days:

wp rudel cleanup --dry-run --max-age-days=7

Configuration

Cleanup behavior is controlled by the Rudel configuration file (rudel-config.json in the wp-content directory):

SettingDescriptionDefault
max_sandboxesMaximum number of active sandboxes (enforced at creation time)0 (no limit)
max_age_daysSandboxes older than this are eligible for cleanup0 (disabled)
max_disk_mbMaximum 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:

  1. If max_age_days is 0 (the default) and no --max-age-days override is provided, cleanup returns immediately with no removals.
  2. Sandboxes older than max_age_days are removed.
  3. 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.

On this page