mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 00:47:48 +08:00

The previous definition was the same as the docker images prune command and referenced dangling images, which isn't what the command does. This commit brings the command description more inline with the buildctl definition. Additionally, add some more description of what the various flags do in our reference pages. Signed-off-by: Justin Chadwell <me@jedevc.com>
1.4 KiB
1.4 KiB
buildx prune
docker buildx prune
Remove build cache
Options
Name | Type | Default | Description |
---|---|---|---|
-a , --all |
Include internal/frontend images | ||
--builder |
string |
Override the configured builder instance | |
--filter |
filter |
Provide filter values (e.g., until=24h ) |
|
-f , --force |
Do not prompt for confirmation | ||
--keep-storage |
bytes |
0 |
Amount of disk space to keep for cache |
--verbose |
Provide a more verbose output |
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
or2h30m
, 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 theBUILDKIT_SYNTAX
build argument.
Examples
Override the configured builder instance (--builder)
Same as buildx --builder
.