Skip to content

Commit 83384eb

Browse files
dvdksnclaude
andcommitted
docs: add docker builder prune to pruning page
Fixes #17590. Adds a new "Prune build cache" section covering docker builder prune, including the --all flag for removing all build cache (not just dangling entries). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 08633c8 commit 83384eb

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

content/manuals/engine/manage-resources/pruning.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
description: Free up disk space by removing unused resources with the prune command
3-
keywords: pruning, prune, images, volumes, containers, networks, disk, administration,
3+
keywords:
4+
pruning, prune, images, volumes, containers, networks, disk, administration,
45
garbage collection
56
title: Prune unused Docker objects
67
aliases:
7-
- /engine/admin/pruning/
8-
- /config/pruning/
8+
- /engine/admin/pruning/
9+
- /config/pruning/
910
---
1011

1112
Docker takes a conservative approach to cleaning up unused objects (often
@@ -143,6 +144,25 @@ Other filtering expressions are available. See the
143144
[`docker network prune` reference](/reference/cli/docker/network/prune/)
144145
for more examples.
145146

147+
## Prune build cache
148+
149+
`docker buildx prune` removes the build cache for the currently selected
150+
builder. If you use multiple builders, each builder maintains its own cache —
151+
use the `--builder` flag to target a specific builder instance.
152+
153+
```console
154+
$ docker buildx prune
155+
156+
WARNING! This will remove all dangling build cache.
157+
Are you sure you want to continue? [y/N] y
158+
```
159+
160+
By default, you're prompted to continue. To bypass the prompt, use the `-f` or
161+
`--force` flag.
162+
163+
See the [`docker buildx prune` reference](/reference/cli/docker/buildx/prune/)
164+
for all options, including `--all` to also remove internal and frontend images.
165+
146166
## Prune everything
147167

148168
The `docker system prune` command is a shortcut that prunes images, containers,

0 commit comments

Comments
 (0)