Documentation Index
Fetch the complete documentation index at: https://docs.dbdock.xyz/llms.txt
Use this file to discover all available pages before exploring further.
cleanup applies the retention policy from dbdock.config.json. It’s automatic (when runAfterBackup: true) and manual (via this command).
Options
| Option | Description |
|---|---|
--dry-run | Preview what would be deleted without deleting |
--force | Skip the confirmation prompt |
Interactive preview (default)
Dry run
See what would happen without doing it:0 if there’s nothing to delete, so it’s safe in CI.
Force (no prompt)
For automated cleanup in cron jobs:Retention policy
Defined indbdock.config.json:
| Field | Description |
|---|---|
maxBackups | Keep at most N backups. Oldest deleted first. |
maxAgeDays | Delete anything older than N days. |
minBackups | Safety net — never delete below this count, even if other rules say so. |
runAfterBackup | Run cleanup automatically after each dbdock backup. |
How the rules combine
- Start with all backups
- Sort by age, newest first
- The most recent
minBackupsare untouchable - Of the rest, delete anything exceeding
maxBackupsor older thanmaxAgeDays
minBackups always wins. If you have 3 backups and minBackups: 5, cleanup deletes nothing.

