TIL on January 22, 2026
What happens when your rm -rf ~
-r is recursive, which means the rm command can descend into directories. It will do a depth-first search, deleting children directories before parents, crawling its way back up to the root of the Home directory. Sibling order is roughly arbitrary.
-f means force, so it won’t prompt you and will suppress most errors.
- Dotfiles get deleted quickly, breaking new shell sessions.
- Applications that are already running might start failing if important configuration files are deleted.
- The files you have open will stay open, interestingly enough. The file’s data is safe until it closes, since the directory where files are saved may not exist.
- Certain OS behaviors will break (Finder preferences, Dock settings, window positions, etc. all live in
~/Library.
The OS itself will be fine.
Installed applications would be fine (aside from configuration files).
Running processes would still be fine (pending requirements on any files that lives in the Home directory).
macOS protects against removing your Home directory to a certain point: special folders like Documents or Desktop won’t get deleted unless your terminal already has permission to modify those directories.
It’s harder to actually brick a computer through rm -rf because macOS has additional protections for directories like /System or /usr or /Applications.
Because SSDs are so fast, most of your important files may be deleted before it’s physically possible to press ctrl+c to cancel.