Skip to main content

Clear terraform state

Here is how you can empty your state:

terraform
for resource in $(terraform state list); do
terraform state rm $resource
done

another way is to run this single command

terraform
terraform state list | xargs -n1 terraform state rm