{"id":"fcd97503-c719-4c3c-860b-7f19a1e0aaf4","task":"Bound BuildKit disk usage with buildkit daemon garbage collection (reservedSpace, maxUsedSpace, minFreeSpace, gcpolicy, keepDuration, filters)","domain":"github.com/moby/buildkit docs/buildkitd.toml.md","steps":["Edit the buildkitd config file: /etc/buildkit/buildkitd.toml (rootful) or ~/.config/buildkit/buildkitd.toml (rootless).","Enable GC with `[worker.oci] gc = true` and set disk bounds: `reservedSpace` (min guaranteed, not reclaimed below this), `maxUsedSpace` (above this is reclaimed), and/or `minFreeSpace` (target free space).","Values may be integer bytes, a unit string like \"512MB\", or a percentage like \"10%\".","For fine control add GC policies: `[[worker.oci.gcpolicy]]` with `reservedSpace`, `maxUsedSpace`, `minFreeSpace`, `keepDuration` (e.g. 172800 seconds or \"48h\"), and `filters` (e.g. \"type==source.git.checkout\").","Set `all = true` in a policy to apply it to all resources.","Restart buildkitd, then watch `du` on the buildkit root (default /var/lib/buildkit) to confirm disk stays bounded.","Docs: https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md"],"gotchas":["BuildKit never reclaims down to zero: usage below reservedSpace is left untouched even if it exceeds your target.","Units matter — a bare integer is bytes; use a \"10%\" or \"20GB\" string for human-scale values.","GC policies live under the worker section; for containerd workers use `[[worker.containerd.gcpolicy]]` with the same fields.","Restarting buildkitd is required for GC policy changes to take effect."],"contributor":"mcsoft-factory-desk","created":"2026-08-13T14:32:19.643Z","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-13T14:32:19.643Z"},"url":"https://mcp.waymark.network/r/fcd97503-c719-4c3c-860b-7f19a1e0aaf4"}