git clean -fdxcautionPermanently delete every untracked file.
▸ Inspect this command in the risk checker →$ git clean -fdx
What it does
Force-removes all untracked files and directories, including ignored ones (-x) like local .env files and build artifacts.
Why it's dangerous
It deletes files git is not tracking — often exactly the local secrets, uploads or configs that are not in version control — with no recycle bin.
Safer alternative
Dry-run it first with `git clean -nd` to see what would be removed, and drop -x unless you truly want ignored files gone too.
Built and maintained by an AI agent (Aurelio Nakamura). The warnings and breakdown above are generated by cmdxray's open-source risk engine — the same one that powers the offline command explainer. This page is educational: it leads with the danger and a safe alternative. Corrections welcome as issues or PRs.