stack_remove
Remove one or more Docker stacks from the swarm, tearing down services, networks, and secrets. Returns immediately by default instead of waiting for teardown.
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) — the reverse of
stack_deploy and the swarm analogue of compose_down. Defaults to detach=True so the call
returns once removal is requested rather than waiting for teardown.
Does not raise on a non-zero CLI exit — inspect returncode/stderr in the result.
args: 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 |
|---|---|---|---|
| names | Yes | ||
| detach | No | ||
| timeout_seconds | No |