Skip to main content

vulkro-sf org sandbox-refresh-lag

Checks your sandboxes for stale refreshes and near expiry, so you do not test against a schema that no longer matches production.

vulkro-sf org sandbox-refresh-lag --target-org <devhub-alias>
vulkro-sf org sandbox-refresh-lag -o <devhub-alias> --format json

Point --target-org at your Dev Hub, not at a sandbox: sandbox records can only be read there.

FindingSeverityMeaning
SF-SANDBOX-001HighA sandbox was last refreshed more than 180 days ago.
SF-SANDBOX-002MediumA Full sandbox was last refreshed more than 90 days ago.
SF-SANDBOX-003LowA sandbox expires within 30 days.

Lag is judged by dates only. The command does not compare sandbox schema with production, and an old sandbox may be frozen on purpose.

See also: metadiff, masking-rules.