Man page - docker-buildx-prune(1)
Packages contas this manual
- docker-buildx-version(1)
- docker-buildx-du(1)
- docker-buildx-imagetools-inspect(1)
- docker-buildx-stop(1)
- docker-buildx-uninstall(1)
- docker-buildx(1)
- docker-buildx-imagetools-create(1)
- docker-buildx-create(1)
- docker-buildx-imagetools(1)
- docker-buildx-use(1)
- docker-buildx-dial-stdio(1)
- docker-buildx-prune(1)
- docker-buildx-build(1)
- docker-buildx-rm(1)
- docker-buildx-ls(1)
- docker-buildx-inspect(1)
- docker-buildx-install(1)
- docker-buildx-bake(1)
apt-get install docker-buildx
Manual
| DOCKER-BUILDX-PRUNE(1) | DOCKER-BUILDX-PRUNE(1) |
NAME
docker-buildx-prune - Remove build cache
SYNOPSIS
docker buildx prune
DESCRIPTION
Clears the build cache of the selected builder.
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 --all flag to allow clearing internal helper images and frontend images set using the #syntax= directive or the BUILDKIT_SYNTAX build argument.
OPTIONS
-a, --all[=false] Include internal/frontend images
--filter= Provide filter values (e.g., "until=24h")
-f, --force[=false] Do not prompt for confirmation
-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).
SEE ALSO
docker-buildx(1)
| Apr 2025 |