github.com/iaas-resource-provision/iaas-rpc@v1.0.7-0.20211021023331-ed21f798c408/website/docs/cli/commands/destroy.html.md (about) 1 --- 2 layout: "docs" 3 page_title: "Command: destroy" 4 sidebar_current: "docs-commands-destroy" 5 description: "The iaas-rpc.destroy command destroys all objects managed by a Terraform configuration." 6 --- 7 8 # Command: destroy 9 10 The `iaas-rpc.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 `iaas-rpc.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: `iaas-rpc.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`](./apply.html) 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`](./plan.html) 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 `iaas-rpc.destroy` to get the effect of `terraform apply -destroy`.