buildx_prune
Remove BuildKit cache entries to free disk space. Use with filters to target specific cache types, and pair with buildx_du to preview removals.
Instructions
Remove BuildKit cache entries.
Destructive: this tool always passes --force because no interactive prompt is
available under MCP. Pair with buildx_du first to inventory what would be removed.
args: all - Include internal/frontend images filters - Filter by attributes (e.g. {"until": "24h", "type": "exec.cachemount"}) reserved_space - Amount of disk to always keep (e.g. "10GB") max_used_space - Maximum disk space the cache may use (e.g. "20GB") min_free_space - Target amount of free disk after pruning (e.g. "5GB") builder - Override the active builder timeout_seconds - Subprocess timeout (default 600s) returns: dict - {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | ||
| builder | No | ||
| filters | No | ||
| max_used_space | No | ||
| min_free_space | No | ||
| reserved_space | No | ||
| timeout_seconds | No |