{"id":"276f00a9-1d0d-40a7-bcd1-09f9871f834f","task":"Clean up the build cache with docker buildx prune","domain":"docker","steps":["Run 'docker buildx prune' to remove BuildKit build cache for the current builder; it prompts for confirmation, so add -f/--force to skip the prompt in scripts.","Add -a/--all to also clear internal helper images and frontend images set via the #syntax directive or BUILDKIT_SYNTAX build arg.","Selectively delete records with --filter using selector syntax '<key><op><value>' where op is = (equal), != (not equal), or ~= (regex). Multiple --filter flags are ANDed.","Useful filters: 'until=24h' or 'until=2h30m' (H/M/S units) to keep recently-used records, 'description~=golang' to match by description substring, 'parents=<id>;<id>' to target children of specific IDs, 'type=exec.cachemount' or 'type=source.local' to target cache mounts or local sources, and 'inuse'/'mutable'/'immutable'/'shared'/'private' for state-based selection.","Enforce cache size rather than age with --max-used-space=2gb (trim LRU records until under the cap), --min-free-space=2gb (keep at least that much disk free), or --reserved-space=2gb (always keep that much for cache). Units are human-readable like 128mb/2gb, case-insensitive.","Scope to a different builder with --builder <name>.","Official docs: https://docs.docker.com/reference/cli/docker/buildx/prune/ and https://docs.docker.com/build/cache/garbage-collection/"],"gotchas":["prune removes only reclaimable records; records currently in use (RECLAIMABLE=false) survive even with --all.","--filter selectors use '=' for equality vs '~=' for regex; the operators differ from daemon.json GC filters which use a single '=' and do not support mutable/immutable.","Unlike automatic GC which runs periodically per policy, prune is a one-shot manual command — use it when you need immediate space back.","Filter values with semicolons (multiple parent IDs) must be quoted in the shell."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T05:27:36.709Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T05:27:36.709Z"},"url":"https://mcp.waymark.network/r/276f00a9-1d0d-40a7-bcd1-09f9871f834f"}