From 951f7653fc344ecf5787d7faf027879742ca3c75 Mon Sep 17 00:00:00 2001 From: Dean Chen <862469039@qq.com> Date: Mon, 10 Aug 2026 09:45:49 +0500 Subject: [PATCH] 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> --- docs/reference/commandline/system_prune.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/reference/commandline/system_prune.md b/docs/reference/commandline/system_prune.md index 8d3805beae81..ebacf0e99848 100644 --- a/docs/reference/commandline/system_prune.md +++ b/docs/reference/commandline/system_prune.md @@ -18,7 +18,13 @@ Remove unused data ## Description Remove all unused containers, networks, images (both dangling and unused), -and optionally, volumes. +unused [build cache](https://docs.docker.com/build/cache/), and optionally, +volumes. + +Build cache is always eligible for pruning with this command (including BuildKit +cache mounts created with `RUN --mount=type=cache`). Use +[`docker builder prune`](builder_prune.md) if you only want to reclaim build +cache without removing containers, networks, or images. ## Examples