Skip to content

CLI reference

sqt janitor

Preview and remove stale deployment objects after a retention window.

Preview deployment cleanup:

sqt janitor
sqt janitor --retention-days 30
sqt janitor --minimum-rollback-deployments 4
sqt janitor --json

The default retention window is seven days. Janitor also keeps at least the two newest complete previously published deployments outside that window for rollback. Preview output separates deletable and kept deployments and explains each decision.

Apply the same eligibility rules and drop deletable physical objects:

sqt janitor --retention-days 30 --minimum-rollback-deployments 4 --apply

Janitor preserves currently active relations, the configured minimum rollback history, deployments published inside the retention window, and deployments whose physical mappings do not safely match their recorded identity. Immediately before cleanup, it refreshes active state and refuses to remove any relation that became active. Set --minimum-rollback-deployments 0 only when retained rollback history is intentionally expendable.

Janitor removes deployment-specific physical objects, not stable logical views. It requires virtual environments and does not load the pipeline graph.