buildx_remove
Remove a Docker Buildx builder instance and its build cache, or clean up inactive builders. Use force to delete an in-use builder, or keep_state/keep_daemon to preserve the BuildKit state or daemon.
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 (a missing buildx plugin or a timeout still raises) - 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 |