# metalcloud-cli infrastructure delete Delete an infrastructure and all its resources ## Synopsis Delete an infrastructure and all associated resources including compute instances, drives, and network configurations. WARNING: This operation is irreversible and will permanently destroy all data and resources associated with the infrastructure. Make sure to backup any important data before proceeding. The infrastructure must be in a non-deployed state before it can be deleted. If the infrastructure is currently deployed, you must first revert it to remove all active resources. Arguments: infrastructure_id_or_label The ID (numeric) or label (string) of the infrastructure to delete Examples: ## Delete infrastructure by ID metalcloud-cli infrastructure delete 123 ## Delete infrastructure by label metalcloud-cli infrastructure delete "test-cluster" ## Using the alias metalcloud-cli infrastructure rm old-infrastructure ``` metalcloud-cli infrastructure delete infrastructure_id_or_label [flags] ``` ### Options ``` -h, --help help for delete ``` ### Options inherited from parent commands ``` -k, --api_key string MetalCloud API key -c, --config string Config file path -d, --debug Set to enable debug logging -e, --endpoint string MetalCloud API endpoint -f, --format string Output format. Supported values are 'text','csv','md','json','yaml'. (default "text") -i, --insecure_skip_verify Set to allow insecure transport -l, --log_file string Log file path -v, --verbosity string Log level verbosity (default "INFO") ``` ### SEE ALSO * [metalcloud-cli infrastructure](/content/configuration/cli/metalcloud-cli_infrastructure.md) - Manage infrastructure resources and configurations #### Auto generated by spf13/cobra on 11-Aug-2025