github.com/hugorut/terraform@v1.1.3/website/docs/cli/commands/destroy.mdx (about) 1 --- 2 page_title: 'Command: destroy' 3 description: >- 4 The terraform destroy command destroys all objects managed by a Terraform 5 configuration. 6 --- 7 8 # Command: destroy 9 10 The `terraform destroy` command is a convenient way to destroy all remote 11 objects managed by a particular Terraform configuration. 12 13 While you will typically not want to destroy long-lived objects in a production 14 environment, Terraform is sometimes used to manage ephemeral infrastructure 15 for development purposes, in which case you can use `terraform destroy` to 16 conveniently clean up all of those temporary objects once you are finished 17 with your work. 18 19 ## Usage 20 21 Usage: `terraform destroy [options]` 22 23 This command is just a convenience alias for the following command: 24 25 ``` 26 terraform apply -destroy 27 ``` 28 29 For that reason, this command accepts most of the options that 30 [`terraform apply`](/cli/commands/apply) accepts, although it does 31 not accept a plan file argument and forces the selection of the "destroy" 32 planning mode. 33 34 You can also create a speculative destroy plan, to see what the effect of 35 destroying would be, by running the following command: 36 37 ``` 38 terraform plan -destroy 39 ``` 40 41 This will run [`terraform plan`](/cli/commands/plan) in _destroy_ mode, showing 42 you the proposed destroy changes without executing them. 43 44 -> **Note:** The `-destroy` option to `terraform apply` exists only in 45 Terraform v0.15.2 and later. For earlier versions, you _must_ use 46 `terraform destroy` to get the effect of `terraform apply -destroy`.