DOCKER-BUILDX-PRUNE(1)
π docker-buildx-prune β the "okay bestie, time to clean house" page
So likeβ¦ this is part of the docker-buildx manual set (section 1, for the record π), and it's literally just about Remove build cache. That's it. That's the whole gig. Let's go π§Ήβ¨
β¨ NAME β¨
docker-buildx-prune β Remove build cache ποΈπ
πΈ SYNOPSIS πΈ
docker buildx prune
π¦ DESCRIPTION π¦
Clears the build cache of the selected builder. Yeah. All that accumulated β¨stuffβ¨ from your builds? Gone. Poof. Iconic behaviour tbh π
And because you're a main character who likes control, you can finely control what cache data is kept using:
- The
--filter=until=<duration>flag to keep images that have been used in the last<duration>time. β°
<duration> is a duration string, e.g. 24h or 2h30m, with allowable units of (h)ours, (m)inutes and (s)econds.
- The
--keep-storage=<size>flag to keep<size>bytes of data in the cache. π¦
<size> is a human-readable memory string, e.g. 128mb, 2gb, etc. Units are case-insensitive.
- The
--allflag to allow clearing internal helper images and frontend images set using the#syntax=directive or theBUILDKIT_SYNTAXbuild argument. π (yes, the hidden ones. the backstage crew. we see them.)
π OPTIONS π
-a,--all[=false]β Include internal/frontend images π«£--filter=β Provide filter values (e.g., "until=24h") π-f,--force[=false]β Do not prompt for confirmation (living dangerously, love that for you) π-h,--help[=false]β help for prune π--keep-storage=0β Amount of disk space to keep for cache πΎ--verbose[=false]β Provide a more verbose output π£οΈ
π OPTIONS INHERITED FROM PARENT COMMANDS π
--builder=""β Override the configured builder instance ποΈ
β EXAMPLE β
### Override the configured builder instance (--builder) {#builder}
Same as [buildx --builder](/reference/cli/docker/buildx/#builder). Go peek at that one, bestie, it's got the lore π«Ά
π SEE ALSO π
no cap, if you're about to nuke your cache: check --keep-storage first so you don't delete your entire personality. your build times will thank you π
okay that's the whole page, you ate that π
β¨ this was the DOCKER-BUILDX-PRUNE(1) page, straight from the docker-buildx source, dated Apr 2025 β love you, go clear some cache, mwah ππ¦
π¦ where this page comes from
- debian trixie: docker-buildx 0.13.1+ds1-3 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms