Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions cli/command/system/prune.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func newPruneCommand(dockerCli command.Cli) *cobra.Command {
flags := cmd.Flags()
flags.BoolVarP(&options.force, "force", "f", false, "Do not prompt for confirmation")
flags.BoolVarP(&options.all, "all", "a", false, "Remove all unused images not just dangling ones")
flags.BoolVar(&options.pruneVolumes, "volumes", false, "Prune volumes")
flags.BoolVar(&options.pruneVolumes, "volumes", false, "Prune anonymous volumes")
flags.Var(&options.filter, "filter", `Provide filter values (e.g. "label=<key>=<value>")`)
// "filter" flag is available in 1.28 (docker 17.04) and up
flags.SetAnnotation("filter", "version", []string{"1.28"})
Expand Down Expand Up @@ -114,7 +114,7 @@ func confirmationMessage(dockerCli command.Cli, options pruneOptions) string {
"all networks not used by at least one container",
}
if options.pruneVolumes {
warnings = append(warnings, "all volumes not used by at least one container")
warnings = append(warnings, "all anonymous volumes not used by at least one container")
}
if options.all {
warnings = append(warnings, "all images without at least one container associated to them")
Expand Down
2 changes: 1 addition & 1 deletion cli/command/volume/prune.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func NewPruneCommand(dockerCli command.Cli) *cobra.Command {

cmd := &cobra.Command{
Use: "prune [OPTIONS]",
Short: "Remove all unused local volumes",
Short: "Remove unused local volumes",
Args: cli.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
spaceReclaimed, output, err := runPrune(dockerCli, options)
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/commandline/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ read the [`dockerd`](dockerd.md) reference page.
| [volume create](volume_create.md) | Creates a new volume where containers can consume and store data |
| [volume inspect](volume_inspect.md) | Display information about a volume |
| [volume ls](volume_ls.md) | Lists all the volumes Docker knows about |
| [volume prune](volume_prune.md) | Remove all unused local volumes |
| [volume prune](volume_prune.md) | Remove unused local volumes |
| [volume rm](volume_rm.md) | Remove one or more volumes |

### Swarm node commands
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/commandline/system_prune.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Remove unused data
| `-a`, `--all` | | | Remove all unused images not just dangling ones |
| [`--filter`](#filter) | `filter` | | Provide filter values (e.g. `label=<key>=<value>`) |
| `-f`, `--force` | | | Do not prompt for confirmation |
| `--volumes` | | | Prune volumes |
| `--volumes` | | | Prune anonymous volumes |


<!---MARKER_GEN_END-->
Expand Down Expand Up @@ -50,15 +50,15 @@ Total reclaimed space: 1.84kB

By default, volumes are not removed to prevent important data from being
deleted if there is currently no container using the volume. Use the `--volumes`
flag when running the command to prune volumes as well:
flag when running the command to prune anonymous volumes as well:

```console
$ docker system prune -a --volumes

WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all volumes not used by at least one container
- all anonymous volumes not used by at least one container
- all images without at least one container associated to them
- all build cache
Are you sure you want to continue? [y/N] y
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/commandline/volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Manage volumes
| [`create`](volume_create.md) | Create a volume |
| [`inspect`](volume_inspect.md) | Display detailed information on one or more volumes |
| [`ls`](volume_ls.md) | List volumes |
| [`prune`](volume_prune.md) | Remove all unused local volumes |
| [`prune`](volume_prune.md) | Remove unused local volumes |
| [`rm`](volume_rm.md) | Remove one or more volumes |
| [`update`](volume_update.md) | Update a volume (cluster volumes only) |

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/commandline/volume_prune.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# volume prune

<!---MARKER_GEN_START-->
Remove all unused local volumes
Remove unused local volumes

### Options

Expand Down