Safe-rm is a safety tool intended to prevent the accidental deletion of important files by replacing /bin/rm with a wrapper, which checks the given arguments against a configurable blacklist of files and directories that should never be removed.
Extracted automatically from SafeRm homepage
brew install safe-rm
This formula has no dependencies.