github.com/brahmaroutu/docker@v1.2.1-0.20160809185609-eb28dde01f16/docs/reference/commandline/swarm_leave.md (about) 1 <!--[metadata]> 2 +++ 3 title = "swarm leave" 4 description = "The swarm leave command description and usage" 5 keywords = ["swarm, leave"] 6 [menu.main] 7 parent = "smn_cli" 8 +++ 9 <![end-metadata]--> 10 11 # swarm leave 12 13 ```markdown 14 Usage: docker swarm leave [OPTIONS] 15 16 Leave a swarm 17 18 Options: 19 --force Force leave ignoring warnings. 20 --help Print usage 21 ``` 22 23 This command causes the node to leave the swarm. 24 25 On a manager node: 26 ```bash 27 $ docker node ls 28 ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS 29 7ln70fl22uw2dvjn2ft53m3q5 worker2 Ready Active 30 dkp8vy1dq1kxleu9g4u78tlag worker1 Ready Active Reachable 31 dvfxp4zseq4s0rih1selh0d20 * manager1 Ready Active Leader 32 ``` 33 34 On a worker node: 35 ```bash 36 $ docker swarm leave 37 Node left the default swarm. 38 ``` 39 40 On a manager node: 41 ```bash 42 $ docker node ls 43 ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS 44 7ln70fl22uw2dvjn2ft53m3q5 worker2 Down Active 45 dkp8vy1dq1kxleu9g4u78tlag worker1 Ready Active Reachable 46 dvfxp4zseq4s0rih1selh0d20 * manager1 Ready Active Leader 47 ``` 48 49 ## Related information 50 51 * [swarm init](swarm_init.md) 52 * [swarm join](swarm_join.md) 53 * [swarm update](swarm_update.md)