Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 11
    Strictly speaking, at some point it will delete /bin/rm, and after that it will fail to delete any more files. The suggestion by @ott to use -delete would fix this "bug" :-) Commented Sep 3, 2015 at 20:33
  • 4
    This avoids the built-in protection in GNU rm, which blatantly refuses to remove everything from the root downward. Commented Sep 4, 2015 at 2:43
  • 3
    Note that this command won't be equivalent to sudo rm -rf /. Attempt to remove / is prohibit by POSIX rm (busybox rm does remove /). Commented Sep 4, 2015 at 8:55
  • As Cuonglm said, sudo rm -rf / is harmless on POSIX (and most other) systems, so no, this is not like it at all! Commented Sep 4, 2015 at 11:02