github.com/khulnasoft/cli@v0.0.0-20240402070845-01bcad7beefa/docs/reference/commandline/network_rm.md (about)

     1  # network rm
     2  
     3  <!---MARKER_GEN_START-->
     4  Remove one or more networks
     5  
     6  ### Aliases
     7  
     8  `docker network rm`, `docker network remove`
     9  
    10  ### Options
    11  
    12  | Name            | Type | Default | Description                                |
    13  |:----------------|:-----|:--------|:-------------------------------------------|
    14  | `-f`, `--force` |      |         | Do not error if the network does not exist |
    15  
    16  
    17  <!---MARKER_GEN_END-->
    18  
    19  ## Description
    20  
    21  Removes one or more networks by name or identifier. To remove a network,
    22  you must first disconnect any containers connected to it.
    23  
    24  ## Examples
    25  
    26  ### Remove a network
    27  
    28  To remove the network named 'my-network':
    29  
    30  ```console
    31  $ docker network rm my-network
    32  ```
    33  
    34  ### Remove multiple networks
    35  
    36  To delete multiple networks in a single `docker network rm` command, provide
    37  multiple network names or ids. The following example deletes a network with id
    38  `3695c422697f` and a network named `my-network`:
    39  
    40  ```console
    41  $ docker network rm 3695c422697f my-network
    42  ```
    43  
    44  When you specify multiple networks, the command attempts to delete each in turn.
    45  If the deletion of one network fails, the command continues to the next on the
    46  list and tries to delete that. The command reports success or failure for each
    47  deletion.
    48  
    49  ## Related commands
    50  
    51  * [network disconnect ](network_disconnect.md)
    52  * [network connect](network_connect.md)
    53  * [network create](network_create.md)
    54  * [network ls](network_ls.md)
    55  * [network inspect](network_inspect.md)
    56  * [network prune](network_prune.md)
    57  * [Understand Docker container networks](https://docs.docker.com/network/)