Is it safe to delete .terraform (project)?

<project>/.terraform · Check first

What it is

Providers and modules downloaded by terraform init for one project.

Can you delete it?

Sometimes, check what is inside first. Usually rebuildable with terraform init. Check first that your state lives in a remote backend or terraform.tfstate, not only here.

How to clean it safely

  1. Check where the project's state is kept.
  2. Delete .terraform, then run terraform init when needed.

Step-by-step guide: Developer caches on a Mac →

Questions

Is it safe to delete <project>/.terraform?

Sometimes, check what is inside first. Usually rebuildable with terraform init. Check first that your state lives in a remote backend or terraform.tfstate, not only here.

Let the raccoon do it, safely

Junk Raccoon finds this clutter for you, shows every file first, and keeps a one-click way back. Free to download, no account, no ads.

Download for Mac