The short answer
Yes. Rebuilt or re-downloaded automatically when needed.
What is it?
The pre-commit framework installs the tools your Git hooks use (linters, formatters and their language runtimes) into isolated environments in ~/.cache/pre-commit, one per hook repository and version. Environments for old hook versions stay when you update your configuration.
What happens if you delete it?
pre-commit installs the environments again the next time a hook runs, which makes that commit noticeably slower. Your .pre-commit-config.yaml files are not affected.
How to remove it properly
Run pre-commit gc to remove only environments no longer used by any configuration, or pre-commit clean to remove them all; both are pre-commit’s own commands. Moving the folder to the Trash is equivalent to pre-commit clean.
Quit the app that uses it, then move it to the Trash. Empty the Trash when you’re sure.
How MoreRoom helps
MoreRoom recognises this item, shows its real size and when it was last used, and labels it “Safe to remove”. In the free version you can move it to the Trash in one click, with Undo; Pro collects every safe item at once.
Frequently asked questions
Is it safe to delete the pre-commit cache?
Yes. Rebuilt or re-downloaded automatically when needed. pre-commit installs the environments again the next time a hook runs, which makes that commit noticeably slower. Your .pre-commit-config.yaml files are not affected.
Will pre-commit hook environments come back after I delete it?
Yes. pre-commit installs the environments again the next time a hook runs, which makes that commit noticeably slower. Your .pre-commit-config.yaml files are not affected.
How do I remove pre-commit hook environments properly?
Run pre-commit gc to remove only environments no longer used by any configuration, or pre-commit clean to remove them all; both are pre-commit’s own commands. Moving the folder to the Trash is equivalent to pre-commit clean.