Is it safe to delete Terraform plugin cache?

~/.terraform.d/plugin-cache · Safe to delete

What it is

Shared download cache for Terraform providers, if you set plugin_cache_dir.

Can you delete it?

Yes, it is rebuilt automatically. terraform init downloads providers again when they are missing.

How to clean it safely

  1. Delete the contents.
  2. Run terraform init in projects you still use.

How big is it on your Mac?

This read-only command prints its size and changes nothing:

 Terminal
du -sh ~/".terraform.d/plugin-cache" 2>/dev/null

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

Questions

Is it safe to delete ~/.terraform.d/plugin-cache?

Yes, it is rebuilt automatically. terraform init downloads providers again when they are missing.

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