mirror of
https://github.com/docker/docs.git
synced 2026-11-04 10:01:00 +00:00
Vendor the checked-in CLI YAML from Docker Sandboxes release/v0.51 at 7d55286de0c7. This updates command help, adds `sbx policy check http`, and replaces seven agent-specific create pages with redirects to `sbx create`. Validation: full site build with Hugo 0.169.0; upstream byte-for-byte comparison; all 115 command pages, reference links, and seven redirects checked; template formatting and whitespace checks passed.
75 lines
2.7 KiB
YAML
75 lines
2.7 KiB
YAML
name: sbx prune
|
|
synopsis: Remove all stopped sandboxes
|
|
description: |-
|
|
Remove all stopped sandboxes and their associated resources.
|
|
|
|
Only stopped sandboxes are candidates — a running sandbox is never removed,
|
|
which makes this safe to run habitually. Stop a sandbox first with
|
|
"sbx stop" if you want it pruned. To remove a specific sandbox regardless of
|
|
state, use "sbx rm SANDBOX".
|
|
|
|
Use --filter until=TIMESTAMP to narrow the set to sandboxes that stopped before
|
|
TIMESTAMP. The value can be an RFC 3339 timestamp, Unix timestamp, or Go duration
|
|
relative to now (e.g. until=168h keeps anything stopped within the last week).
|
|
A sandbox whose stop time the daemon cannot report is left alone, since how long
|
|
it has been stopped cannot be established.
|
|
|
|
Use --dry-run to list what would be removed without removing anything, and
|
|
--format json or --format yaml with it for machine-readable output.
|
|
|
|
Pruning requires confirmation; use --force to skip the confirmation prompt
|
|
(for non-interactive scripts) and to remove a sandbox that is in use (e.g. an
|
|
open SSH connection). This action cannot be undone.
|
|
|
|
Secrets scoped to each successfully pruned sandbox are also deleted.
|
|
|
|
Local-only: cloud sandboxes expire via their TTL.
|
|
usage: sbx prune [flags]
|
|
options:
|
|
- name: dry-run
|
|
default_value: "false"
|
|
usage: |
|
|
List the sandboxes that would be removed without removing them
|
|
- name: filter
|
|
default_value: '[]'
|
|
usage: |
|
|
Filter candidates (supported: until=TIMESTAMP — stopped before TIMESTAMP)
|
|
- name: force
|
|
shorthand: f
|
|
default_value: "false"
|
|
usage: |
|
|
Skip confirmation prompts and remove even if in use (e.g. an open SSH connection)
|
|
- name: format
|
|
usage: 'Output format: table, json or yaml'
|
|
- name: help
|
|
shorthand: h
|
|
default_value: "false"
|
|
usage: help for prune
|
|
- name: json
|
|
default_value: "false"
|
|
usage: Output in JSON format
|
|
inherited_options:
|
|
- name: cloud
|
|
default_value: "false"
|
|
usage: |
|
|
Dispatch to Docker Cloud Sandboxes API instead of local sandboxd (supported by a growing set of verbs — run 'sbx --cloud --help' for the current list)
|
|
- name: debug
|
|
shorthand: D
|
|
default_value: "false"
|
|
usage: Enable debug logging
|
|
- name: no-input
|
|
default_value: "false"
|
|
usage: |
|
|
Never prompt; commands that need an answer fail with the command to run instead
|
|
example: |4-
|
|
# Show what would be removed
|
|
sbx prune --dry-run
|
|
|
|
# Remove without asking
|
|
sbx prune --force
|
|
|
|
# Only sandboxes stopped before a point in time
|
|
sbx prune --filter until=2026-01-01T00:00:00Z
|
|
see_also:
|
|
- sbx - Manage AI coding agent sandboxes.
|