terraform destroy

Destroy all managed infrastructure

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
terraform plan -destroy -out=destroy.tfplanReview the destroy plan
terraform workspace showConfirm the environment
terraform destroy -target=<resource>Narrow the blast radius
What it does

Plans and removes all resources managed by the current configuration/workspace.

Common flags
FlagMeaning
-target-target⚠ Limit to specific resources
-auto-approve-auto-approve⚠ Skip confirmation
plan -destroyPreview what would be destroyed
Examples
terraform plan -destroyPreview · explain & risk-check →
terraform destroy -target=aws_instance.testDestroy one resource · explain & risk-check →
Related
terraform plan terraform state
Open the full explainer →More in Terraform, Ansible & IaC

Reference text is hand-written and may be incomplete — check man terraform for your version. Test destructive commands on a non-production system first.