mirror of
https://github.com/moby/moby.git
synced 2026-08-04 15:11:00 +00:00
Command name should be a H1
Only Description, Examples, and Related Commands should be H2
Changed 'Related information' heading to 'Related commands' since 99% it is only linking commands
Added some examples where relevant
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
(cherry picked from commit 52df69f00d)
50 lines
1.1 KiB
Markdown
50 lines
1.1 KiB
Markdown
---
|
|
title: "network prune"
|
|
description: "Remove unused networks"
|
|
keywords: "network, prune, delete"
|
|
---
|
|
|
|
# network prune
|
|
|
|
```markdown
|
|
Usage: docker network prune [OPTIONS]
|
|
|
|
Remove all unused networks
|
|
|
|
Options:
|
|
-f, --force Do not prompt for confirmation
|
|
--help Print usage
|
|
```
|
|
|
|
## Description
|
|
|
|
Remove all unused networks. Unused networks are those which are not referenced
|
|
by any containers.
|
|
|
|
## Examples
|
|
|
|
```bash
|
|
$ docker network prune
|
|
|
|
WARNING! This will remove all networks not used by at least one container.
|
|
Are you sure you want to continue? [y/N] y
|
|
Deleted Networks:
|
|
n1
|
|
n2
|
|
```
|
|
|
|
## Related commands
|
|
|
|
* [network disconnect ](network_disconnect.md)
|
|
* [network connect](network_connect.md)
|
|
* [network create](network_create.md)
|
|
* [network ls](network_ls.md)
|
|
* [network inspect](network_inspect.md)
|
|
* [network rm](network_rm.md)
|
|
* [Understand Docker container networks](https://docs.docker.com/engine/userguide/networking/)
|
|
* [system df](system_df.md)
|
|
* [container prune](container_prune.md)
|
|
* [image prune](image_prune.md)
|
|
* [volume prune](volume_prune.md)
|
|
* [system prune](system_prune.md)
|