# metalcloud-cli infrastructure revert Revert infrastructure to the last deployed state ## Synopsis Revert an infrastructure to its last successfully deployed state, discarding all pending changes. This command is useful when you want to undo configuration changes that haven't been deployed yet, or when you need to roll back to a known working state. All pending modifications to compute instances, drives, and networks will be reverted. Note: This operation only affects the infrastructure configuration and does not modify any deployed physical resources. To apply the reverted configuration to physical resources, you need to deploy the infrastructure after reverting. Arguments: infrastructure_id_or_label The ID (numeric) or label (string) of the infrastructure to revert Examples: ## Revert infrastructure by ID metalcloud-cli infrastructure revert 123 ## Revert infrastructure by label metalcloud-cli infrastructure revert "web-cluster" ## Using the alias metalcloud-cli infrastructure undo production-env ``` metalcloud-cli infrastructure revert infrastructure_id_or_label [flags] ``` ### Options ``` -h, --help help for revert ``` ### 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