github.com/brahmaroutu/docker@v1.2.1-0.20160809185609-eb28dde01f16/docs/reference/commandline/node_rm.md (about) 1 <!--[metadata]> 2 +++ 3 title = "node rm" 4 description = "The node rm command description and usage" 5 keywords = ["node, remove"] 6 [menu.main] 7 parent = "smn_cli" 8 +++ 9 <![end-metadata]--> 10 11 # node rm 12 13 ```markdown 14 Usage: docker node rm [OPTIONS] NODE [NODE...] 15 16 Remove one or more nodes from the swarm 17 18 Aliases: 19 rm, remove 20 21 Options: 22 --force Force remove an active node 23 --help Print usage 24 ``` 25 26 Removes specified nodes from a swarm. 27 28 29 Example output: 30 31 $ docker node rm swarm-node-02 32 Node swarm-node-02 removed from swarm 33 34 Removes nodes from the swarm that are in the down state. Attempting to remove 35 an active node will result in an error: 36 37 ```bash 38 $ docker node rm swarm-node-03 39 Error response from daemon: rpc error: code = 9 desc = node swarm-node-03 is not down and can't be removed 40 ``` 41 42 If a worker node becomes compromised, exhibits unexpected or unwanted behavior, or if you lose access to it so 43 that a clean shutdown is impossible, you can use the force option. 44 45 ```bash 46 $ docker node rm --force swarm-node-03 47 Node swarm-node-03 removed from swarm 48 ``` 49 50 Note that manager nodes have to be demoted to worker nodes before they can be removed 51 from the cluster. 52 53 ## Related information 54 55 * [node inspect](node_inspect.md) 56 * [node update](node_update.md) 57 * [node ps](node_ps.md) 58 * [node ls](node_ls.md)