Skip to content

Commit

Permalink
Merge pull request #534 from gruntwork-io/clean-cache
Browse files Browse the repository at this point in the history
Add instructions on cleaning up .terragrunt-cache
  • Loading branch information
brikis98 authored Aug 7, 2018
2 parents 0bdb5f9 + a758620 commit c9fc53e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Terragrunt is a thin wrapper for [Terraform](https://www.terraform.io/) that pro
1. [CLI options](#cli-options)
1. [Configuration](#configuration)
1. [Migrating from Terragrunt v0.11.x and Terraform 0.8.x and older](#migrating-from-terragrunt-v011x-and-terraform-08x-and-older)
1. [Clearing the Terragrunt cache](#clearing-the-terragrunt-cache)
1. [Developing Terragrunt](#developing-terragrunt)
1. [License](#license)
Expand Down Expand Up @@ -1141,6 +1142,7 @@ This section contains detailed documentation for the following aspects of Terrag
1. [CLI options](#cli-options)
1. [Configuration](#configuration)
1. [Migrating from Terragrunt v0.11.x and Terraform 0.8.x and older](#migrating-from-terragrunt-v011x-and-terraform-08x-and-older)
1. [Clearing the Terragrunt cache](#clearing-the-terragrunt-cache)
1. [Developing Terragrunt](#developing-terragrunt)
1. [License](#license)
Expand Down Expand Up @@ -1833,6 +1835,32 @@ terragrunt = {
}
```
### Clearing the Terragrunt cache
Terragrunt creates a `.terragrunt-cache` folder in the current working directory as its scratch directory. It downloads
your remote Terraform configurations into this folder, runs your Terraform commands in this folder, and any modules and
providers those commands download also get stored in this folder. You can safely delete this folder any time and
Terragrunt will recreate it as necessary.
If you need to clean up a lot of these folders (e.g., after `terragrunt apply-all`), you can use the following commands
on Mac and Linux:
Recursively find all the `.terragrunt-cache` folders that are children of the current folder:
```bash
find . -type d -name ".terragrunt-cache"
```
If you are ABSOLUTELY SURE you want to delete all the folders that come up in the previous command, you can recursively
delete all of them as follows:
```bash
find . -type d -name ".terragrunt-cache" -prune -exec rm -rf {} \;
```
##### Previous Versions of Terragrunt
Terragrunt v0.11.x and earlier defined the config in a .terragrunt file. Note that the .terragrunt format
Expand Down

0 comments on commit c9fc53e

Please sign in to comment.