--- source_keys: - context7-pre-commit-com - pre-commit-com --- # Wiping the pre-commit cache Reached from `SKILL.md`'s Route table when the user asks to clean the cache or rebuild environments from scratch. Self-contained. ## Gate — confirm first `pre-commit clean` wipes the whole cache at `~/.cache/pre-commit`, forcing every hook environment to be re-downloaded on the next run. Require explicit confirmation before executing it: > "This will wipe the entire pre-commit cache. All hook environments will be re-downloaded on next run. Proceed?" ```bash pre-commit clean ``` Prefer `pre-commit gc` when the goal is only to reclaim disk — it drops unused environments and leaves the ones in use intact, so it needs no confirmation.