compose_down
Stop and remove containers, networks, and optionally volumes for a Docker Compose project. Clean up resources defined in your compose file with this teardown command.
Instructions
Stop and remove containers, networks (and optionally volumes) for a compose project.
Inverse of compose_up. Images are kept; named volumes go only with volumes=True
(destructive). Use compose_stop to stop without removing anything.
Does not raise on a non-zero CLI exit — inspect returncode/stderr in the result.
args:
project_dir - Dir with the compose file (default: server cwd; copied to the target host if no local plugin)
files - Explicit compose file paths (repeatable, -f)
project_name - Compose project name override
profiles - Profiles to consider
volumes - Also remove named volumes declared by the project (destructive)
remove_orphans - Remove containers not declared in the compose file
timeout_seconds - Subprocess timeout (default 300s)
returns: dict - {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | ||
| volumes | No | ||
| profiles | No | ||
| project_dir | No | ||
| project_name | No | ||
| remove_orphans | No | ||
| timeout_seconds | No |