macOS
brew install tfcleanlocal Homebrew formula metadata
brew / rank 9050
Remove applied moved block, import block, etc. Version 0.0.19 via Homebrew; verified 2026-07-26.
install
brew install tfcleanlocal Homebrew formula metadata
overview
Remove applied moved block, import block, etc
history
tfclean is a Terraform cleanup CLI that removes applied `moved`, `import`, and `removed` blocks from configuration files. It targets the maintenance phase after refactors or imports have already been applied.
The repository began in June 2024 with an initial implementation, README, and import-block support. v0.0.1 was tagged on 2024-07-01, and the changelog shows rapid iteration through parsing fixes and support for more Terraform block types.
By v0.0.4 the project had support for `removed` blocks and forced removal of all block types. Later releases added flags, pre-commit support, GitHub Action installation, aqua installation docs, S3 backend auto-detection, and parser refactoring.
The README documents installation through the author's Homebrew tap, `go install`, aqua, GitHub Actions, and release binaries. It also includes a GitHub Actions workflow that runs tfclean and opens a pull request when cleanup changes are detected.
Users point `tfclean` at a directory of Terraform files to remove all relevant blocks, or pass `--tfstate` so it removes only blocks that have already been applied. With S3 backends, the tool can detect state location from Terraform backend configuration in `.tf` files.
tfclean is a package-nerd maintenance tool: it exists because modern Terraform/OpenTofu workflows produce temporary declarative migration blocks that should eventually disappear. Installing it as a CLI or GitHub Action lets teams automate that cleanup without hand-editing HCL.
security posture
No matching local secret-handling manifest was found for tfclean. Nucleus package metadata is still published here so future coverage has a stable package URL.
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
tfclean | executable | indexed executable | Discovered from the local executable index. |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
install metadata
| Package key | brew:tfclean |
|---|---|
| Version | 0.0.19 |
| Package manager | Homebrew |
| Homepage | https://github.com/takaishi/tfclean |
| Repository | https://github.com/takaishi/tfclean |
| Last updated | 2026-07-26T00:50:38+02:00 |
| Pulse | updated |
| Bottle | not recorded |
| Service | none declared |
source trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.