2016-10-14 22:30:36 +00:00
|
|
|
---
|
|
|
|
title: "network rm"
|
|
|
|
description: "the network rm command description and usage"
|
|
|
|
keywords: ["network, rm, user-defined"]
|
|
|
|
---
|
2015-09-29 01:57:03 +00:00
|
|
|
|
2016-10-19 17:25:45 +00:00
|
|
|
<!-- This file is maintained within the docker/docker Github
|
|
|
|
repository at https://github.com/docker/docker/. Make all
|
|
|
|
pull requests against that repo. If you see this file in
|
|
|
|
another repository, consider it read-only there, as it will
|
|
|
|
periodically be overwritten by the definitive file. Pull
|
|
|
|
requests which include edits to this file in other repositories
|
|
|
|
will be rejected.
|
|
|
|
-->
|
|
|
|
|
2015-09-29 01:57:03 +00:00
|
|
|
# network rm
|
|
|
|
|
2016-07-07 18:43:18 +00:00
|
|
|
```markdown
|
2016-07-29 17:41:52 +00:00
|
|
|
Usage: docker network rm NETWORK [NETWORK...]
|
2015-09-29 01:57:03 +00:00
|
|
|
|
2016-07-29 17:41:52 +00:00
|
|
|
Remove one or more networks
|
2015-09-29 01:57:03 +00:00
|
|
|
|
2016-07-07 18:43:18 +00:00
|
|
|
Aliases:
|
|
|
|
rm, remove
|
|
|
|
|
|
|
|
Options:
|
|
|
|
--help Print usage
|
|
|
|
```
|
2015-09-29 01:57:03 +00:00
|
|
|
|
2015-10-29 16:10:20 +00:00
|
|
|
Removes one or more networks by name or identifier. To remove a network,
|
|
|
|
you must first disconnect any containers connected to it.
|
|
|
|
To remove the network named 'my-network':
|
2015-09-29 01:57:03 +00:00
|
|
|
|
2015-10-18 23:47:32 +00:00
|
|
|
```bash
|
2015-09-29 01:57:03 +00:00
|
|
|
$ docker network rm my-network
|
|
|
|
```
|
2015-10-18 23:47:32 +00:00
|
|
|
|
2015-10-29 16:10:20 +00:00
|
|
|
To delete multiple networks in a single `docker network rm` command, provide
|
2016-02-17 03:54:45 +00:00
|
|
|
multiple network names or ids. The following example deletes a network with id
|
2015-10-29 16:10:20 +00:00
|
|
|
`3695c422697f` and a network named `my-network`:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ docker network rm 3695c422697f my-network
|
|
|
|
```
|
|
|
|
|
|
|
|
When you specify multiple networks, the command attempts to delete each in turn.
|
|
|
|
If the deletion of one network fails, the command continues to the next on the
|
|
|
|
list and tries to delete that. The command reports success or failure for each
|
|
|
|
deletion.
|
|
|
|
|
2015-10-18 23:47:32 +00:00
|
|
|
## Related information
|
|
|
|
|
|
|
|
* [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)
|
2016-10-18 04:36:52 +00:00
|
|
|
* [network prune](network_prune.md)
|
2016-10-21 03:24:28 +00:00
|
|
|
* [Understand Docker container networks](https://docs.docker.com/engine/userguide/networking/)
|