stack_rm
Remove one or more stacks from a Docker swarm, tearing down their services, networks, and secrets. Returns immediately by default or waits for complete removal.
Instructions
Remove one or more stacks from the swarm (tears down their services, networks, and secrets).
Destructive: this stops and deletes every service in the named stack(s). Defaults to
detach=True so the call returns once removal is requested rather than waiting for teardown.
args: stack_names - One or more stack names to remove. At least one is required. detach - Return immediately (True) vs wait for the stack(s) to be fully removed (False) timeout_seconds - Subprocess timeout (default 300s) returns: dict - {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detach | No | ||
| stack_names | Yes | ||
| timeout_seconds | No |