Docker CLI
docker network rm
Removes specified networks. Attached endpoints must be disconnected first; inspect ownership before removing anything. Example assumes the custom-network lab container has already been removed; never use this on unrelated networks. Do not disconnect unrelated endpoints to force removal.
Formal Syntax & Structure
docker syntaxdocker
docker network rm NETWORK [NETWORK...]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| NETWORK | string | Name or ID of a lab-owned network. |
Working Example
Example Snippetdocker
docker network rm bm-v05-custom-net