buildx_remove
Remove a Docker builder instance, clearing its build cache unless keep_state is set. Force removal even if the builder is in use.
Instructions
Remove a builder instance.
Deletes a builder made by buildx_create, including its build cache unless keep_state=True;
use buildx_prune to reclaim cache while keeping the builder.
Does not raise on a non-zero CLI exit — inspect returncode/stderr in the result.
args:
name - Builder name to remove (mutually exclusive with all_inactive)
all_inactive - Remove every inactive builder
keep_state - Keep the BuildKit state volume
keep_daemon - Keep the BuildKit daemon process running
force - Force removal even if the builder is in use
returns: dict - {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| force | No | ||
| keep_state | No | ||
| keep_daemon | No | ||
| all_inactive | No |