github.com/olljanat/moby@v1.13.1/docs/reference/commandline/node_rm.md (about)

     1  ---
     2  title: "node rm"
     3  description: "The node rm command description and usage"
     4  keywords: "node, remove"
     5  ---
     6  
     7  <!-- This file is maintained within the docker/docker Github
     8       repository at https://github.com/docker/docker/. Make all
     9       pull requests against that repo. If you see this file in
    10       another repository, consider it read-only there, as it will
    11       periodically be overwritten by the definitive file. Pull
    12       requests which include edits to this file in other repositories
    13       will be rejected.
    14  -->
    15  
    16  # node rm
    17  
    18  ```markdown
    19  Usage:	docker node rm [OPTIONS] NODE [NODE...]
    20  
    21  Remove one or more nodes from the swarm
    22  
    23  Aliases:
    24    rm, remove
    25  
    26  Options:
    27    -f, --force   Force remove a node from the swarm
    28        --help    Print usage
    29  ```
    30  
    31  When run from a manager node, removes the specified nodes from a swarm.
    32  
    33  
    34  Example output:
    35  
    36  ```nohighlight
    37  $ docker node rm swarm-node-02
    38  
    39  Node swarm-node-02 removed from swarm
    40  ```
    41  
    42  Removes the specified nodes from the swarm, but only if the nodes are in the
    43  down state. If you attempt to remove an active node you will receive an error:
    44  
    45  ```nohighlight
    46  $ docker node rm swarm-node-03
    47  
    48  Error response from daemon: rpc error: code = 9 desc = node swarm-node-03 is not
    49  down and can't be removed
    50  ```
    51  
    52  If you lose access to a worker node or need to shut it down because it has been
    53  compromised or is not behaving as expected, you can use the `--force` option.
    54  This may cause transient errors or interruptions, depending on the type of task
    55  being run on the node.
    56  
    57  ```nohighlight
    58  $ docker node rm --force swarm-node-03
    59  
    60  Node swarm-node-03 removed from swarm
    61  ```
    62  
    63  A manager node must be demoted to a worker node (using `docker node demote`)
    64  before you can remove it from the swarm.
    65  
    66  ## Related information
    67  
    68  * [node demote](node_demote.md)
    69  * [node inspect](node_inspect.md)
    70  * [node ls](node_ls.md)
    71  * [node promote](node_promote.md)
    72  * [node ps](node_ps.md)
    73  * [node update](node_update.md)