Skip to content

Commit 951f765

Browse files
committed
docs: mention build cache in docker system prune description
The synopsis only listed containers, networks, images, and volumes, but the command always prunes unused build cache (including BuildKit cache mounts). Align the description with the interactive warning. Signed-off-by: Dean Chen <862469039@qq.com>
1 parent 4f84911 commit 951f765

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎docs/reference/commandline/system_prune.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ Remove unused data
1818
## Description
1919

2020
Remove all unused containers, networks, images (both dangling and unused),
21-
and optionally, volumes.
21+
unused [build cache](https://docs.docker.com/build/cache/), and optionally,
22+
volumes.
23+
24+
Build cache is always eligible for pruning with this command (including BuildKit
25+
cache mounts created with `RUN --mount=type=cache`). Use
26+
[`docker builder prune`](builder_prune.md) if you only want to reclaim build
27+
cache without removing containers, networks, or images.
2228

2329
## Examples
2430

0 commit comments

Comments
 (0)