Skip to content

Commit a30229e

Browse files
authored
Merge pull request #25742 from locker95/locker95-system-prune-build-cache-manual
docs: mention build cache in system prune overview
2 parents 4db5640 + 24c67ba commit a30229e

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ aliases:
1010
---
1111

1212
Docker takes a conservative approach to cleaning up unused objects (often
13-
referred to as "garbage collection"), such as images, containers, volumes, and
14-
networks. These objects are generally not removed unless you explicitly ask
15-
Docker to do so. This can cause Docker to use extra disk space. For each type of
16-
object, Docker provides a `prune` command. In addition, you can use `docker
17-
system prune` to clean up multiple types of objects at once. This topic shows
18-
how to use these `prune` commands.
13+
referred to as "garbage collection"), such as images, containers, volumes,
14+
networks, and build cache. These objects are generally not removed unless you
15+
explicitly ask Docker to do so. This can cause Docker to use extra disk space.
16+
For each type of object, Docker provides a `prune` command. In addition, you can
17+
use `docker system prune` to clean up multiple types of objects at once
18+
(including unused build cache). This topic shows how to use these `prune`
19+
commands.
1920

2021
## Prune images
2122

@@ -168,9 +169,10 @@ for all options, including `--all` to also remove internal and frontend images.
168169
## Prune everything
169170

170171
The `docker system prune` command is a shortcut that prunes images, containers,
171-
and networks. Volumes aren't pruned by default. Add `--volumes` to also remove
172-
unused **anonymous** volumes. Named unused volumes are left alone; use
173-
`docker volume prune --all` if you intend to delete those too.
172+
networks, and unused build cache (including BuildKit cache mounts). Volumes
173+
aren't pruned by default. Add `--volumes` to also remove unused **anonymous**
174+
volumes. Named unused volumes are left alone; use `docker volume prune --all`
175+
if you intend to delete those too.
174176

175177
```console
176178
$ docker system prune

0 commit comments

Comments
 (0)