Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit d88786f

Browse files
committed
improve "network prune" output to mention custom networks only
The `docker network prune` command removes unused custom networks, but built-in networks won't be removed. This patch updates the message to mention that it's only removing custom networks. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit eb93a865ed8be7b28e4b03eba975b242d231940d) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: c38b2600770b9199913f0b6065da5a2f5ddd7b0b Component: cli
1 parent c9f1c43 commit d88786f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

components/cli/cli/command/network/prune.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func NewPruneCommand(dockerCli command.Cli) *cobra.Command {
4343
return cmd
4444
}
4545

46-
const warning = `WARNING! This will remove all networks not used by at least one container.
46+
const warning = `WARNING! This will remove all custom networks not used by at least one container.
4747
Are you sure you want to continue?`
4848

4949
func runPrune(dockerCli command.Cli, options pruneOptions) (output string, err error) {

components/cli/docs/reference/commandline/network_prune.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ by any containers.
2727
```bash
2828
$ docker network prune
2929

30-
WARNING! This will remove all networks not used by at least one container.
30+
WARNING! This will remove all custom networks not used by at least one container.
3131
Are you sure you want to continue? [y/N] y
3232
Deleted Networks:
3333
n1

0 commit comments

Comments
 (0)