Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions content/manuals/engine/manage-resources/pruning.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
description: Free up disk space by removing unused resources with the prune command
keywords: pruning, prune, images, volumes, containers, networks, disk, administration,
keywords:
pruning, prune, images, volumes, containers, networks, disk, administration,
garbage collection
title: Prune unused Docker objects
aliases:
- /engine/admin/pruning/
- /config/pruning/
- /engine/admin/pruning/
- /config/pruning/
---

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

## Prune build cache

`docker buildx prune` removes the build cache for the currently selected
builder. If you use multiple builders, each builder maintains its own cache —
use the `--builder` flag to target a specific builder instance.

```console
$ docker buildx prune

WARNING! This will remove all dangling build cache.
Are you sure you want to continue? [y/N] y
```

By default, you're prompted to continue. To bypass the prompt, use the `-f` or
`--force` flag.

See the [`docker buildx prune` reference](/reference/cli/docker/buildx/prune/)
for all options, including `--all` to also remove internal and frontend images.

## Prune everything

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