cmdxray / dangerous commands / find-delete-root

find / -deletedanger

Walk the whole filesystem deleting everything it matches.

▸ Inspect this command in the risk checker →

What cmdxray flags

Breakdown, token by token

$ find / -delete

  • findwalk a directory tree looking for files
  • /an argument passed to the command
  • -deletedelete each matching file

What it does

Traverses the entire filesystem from / and deletes every entry it visits — with no name filter, that is effectively every file and directory it has permission to remove.

Why it's dangerous

There is no confirmation and no trash. A find that starts at / (or a too-broad pattern) deletes far more than intended and can gut the running system.

Safer alternative

Always scope find to a specific directory and test first: run it with `-print` (or no action) to see what would match, then narrow with `-name`/`-type`/`-mtime` before adding `-delete`.

More dangerous commands

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.