1---
2layout: "docs"
3page_title: "Commands: Leave"
4sidebar_current: "docs-commands-leave"
5description: |-
6  The `leave` command triggers a graceful leave and shutdown of the agent. It is used to ensure other nodes see the agent as left instead of failed. Nodes that leave will not attempt to re-join the cluster on restarting with a snapshot.
7---
8
9# Consul Leave
10
11Command: `consul leave`
12
13The `leave` command triggers a graceful leave and shutdown of the agent.
14It is used to ensure other nodes see the agent as "left" instead of
15"failed". Nodes that leave will not attempt to re-join the cluster
16on restarting with a snapshot.
17
18For nodes in server mode, the node is removed from the Raft peer set
19in a graceful manner. This is critical, as in certain situations a
20non-graceful leave can affect cluster availability.
21
22Running `consul leave` on a server explicitly will reduce the quorum size. Even if the cluster used `bootstrap_expect` to set a quorum size initially, issuing `consul leave` on a server will reconfigure the cluster to have fewer servers.
23This means you could end up with just one server that is still able to commit writes because quorum is only 1, but those writes might be lost if that server fails before more are added.
24
25## Usage
26
27Usage: `consul leave [options]`
28
29#### API Options
30
31<%= partial "docs/commands/http_api_options_client" %>
32