rm -rf $HOMEdanger

Delete your entire home directory, no prompt.

▸ Inspect this command in the risk checker →

What cmdxray flags

Breakdown, token by token

$ rm -rf $HOME/

  • rmremove files or directories
  • -rrecurse into directories (delete their contents)
  • -fforce — ignore missing files, never prompt
  • $HOME/an argument passed to the command

What it does

Recursively force-deletes everything under your home directory — documents, config, SSH keys, projects.

Why it's dangerous

A single stray variable or trailing slash turns routine cleanup into total data loss. If $HOME is empty or unset, `rm -rf $HOME/` can degrade toward `rm -rf /`.

Safer alternative

Delete named subpaths, not $HOME itself. Quote and expand variables carefully, and test the target first with `ls -d -- "$HOME/thing"` before deleting.

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.