github.com/kcburge/terraform@v0.11.12-beta1/website/docs/commands/workspace/delete.html.md (about) 1 --- 2 layout: "commands-workspace" 3 page_title: "Command: workspace delete" 4 sidebar_current: "docs-workspace-sub-delete" 5 description: |- 6 The terraform workspace delete command is used to delete a workspace. 7 --- 8 9 # Command: workspace delete 10 11 The `terraform workspace delete` command is used to delete an existing workspace. 12 13 ## Usage 14 15 Usage: `terraform workspace delete [NAME]` 16 17 This command will delete the specified workspace. 18 19 To delete an workspace, it must already exist, it must have an empty state, 20 and it must not be your current workspace. If the workspace state is not empty, 21 Terraform will not allow you to delete it unless the `-force` flag is specified. 22 23 If you delete a workspace with a non-empty state (via `-force`), then resources 24 may become "dangling". These are resources that physically exist but that 25 Terraform can no longer manage. This is sometimes preferred: you want 26 Terraform to stop managing resources so they can be managed some other way. 27 Most of the time, however, this is not intended and so Terraform protects you 28 from getting into this situation. 29 30 The command-line flags are all optional. The only supported flag is: 31 32 * `-force` - Delete the workspace even if its state is not empty. Defaults to false. 33 34 ## Example 35 36 ``` 37 $ terraform workspace delete example 38 Deleted workspace "example". 39 ```