opencenter cluster destroy
Destroy a cluster
Synopsis
Destroy a cluster’s infrastructure and optionally remove its configuration files.
This command first destroys the cloud infrastructure (via OpenTofu for supported providers), then optionally removes local configuration files and GitOps directories.
By default, local files are preserved after infrastructure destruction to allow for inspection, debugging, or recovery. Use --remove-files to also delete local files.
The cluster name can be specified as 'cluster' or 'organization/cluster'. If no cluster name is provided, the active cluster will be destroyed.
If an existing lock is found, you will be prompted to break it. Use --break-lock to automatically break any existing lock without prompting.
opencenter cluster destroy [name] [flags]
Examples
# Destroy infrastructure only (keep local files for inspection)
opencenter cluster destroy my-cluster --force
# Destroy infrastructure AND remove all local files
opencenter cluster destroy my-cluster --force --remove-files
# Skip infrastructure destruction (just remove local files)
opencenter cluster destroy my-cluster --force --skip-infrastructure --remove-files
# Destroy cluster in specific organization
opencenter cluster destroy myorg/my-cluster --force
# Destroy and break any existing lock without prompting
opencenter cluster destroy my-cluster --force --break-lock
# Destroy active cluster
opencenter cluster destroy --force