cmdxray / dangerous commands / rm-rf-slash

rm -rf --no-preserve-root /danger

Erase the entire filesystem from the root down.

▸ Inspect this command in the risk checker →

What cmdxray flags

Breakdown, token by token

$ rm -rf --no-preserve-root /

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

What it does

Recursively and forcibly deletes every file starting at the root directory (/). The --no-preserve-root flag exists only to switch off the safety interlock that modern rm uses to refuse this exact command.

Why it's dangerous

This wipes the whole system — the OS, your data, everything mounted under / — without a single confirmation prompt. There is no undo. On many setups it will keep deleting until the shell itself disappears.

Safer alternative

Never disable --no-preserve-root. Delete a specific, absolute path you have typed out in full (e.g. rm -rf /home/me/old-project), and consider `rm -rI` which asks once before removing a lot of files.

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.