Skip to content
SHC Docs

shc node leave

leave the cluster

Leave the cluster (self-leave when [node] omitted) or request the named node to leave. Wrapper for shc cluster leave.

With —purge (self only, requires —force) this instead does a thermonuclear teardown of THIS host: a best-effort graceful leave, then it wipes ALL local SHC state — the cluster database (including raft state), certificates, node identity, and every SHC deployment’s containers/networks/VOLUMES (all app data) — and leaves the docker swarm. Non-SHC docker volumes are untouched. Use it to fully reset a node before a clean shc init.

shc node leave [node] [flags]
-f, --force force removal
-h, --help help for leave
--purge DESTRUCTIVE self-only: wipe ALL local SHC state (database, certs, every deployment's containers/networks/volumes) + leave the swarm; requires --force
--resume resume a previously failed leave
-y, --yes skip confirmation prompt
--config stringArray extra YAML config file to layer on top of auto-discovered config; repeatable, later files win
-d, --debug enable debug mode (default: $SHC_DEBUG)
-e, --environment string environment name (default: $SHC_ENVIRONMENT)
--exclude string comma-separated dotted paths to drop
--fields string comma-separated columns/keys to show (and their order)
--filter string comma-separated dotted paths to keep (drops everything else)
-o, --output string output format: tty|text|json|yaml (default: $SHC_OUTPUT)
-s, --stack string stack name (default: $SHC_STACK)
-t, --tenant string tenant name (default: $SHC_TENANT)
-v, --verbose verbose output (default: $SHC_VERBOSE)
  • shc node - manage and inspect cluster nodes