safe-rm

Wraps rm command to prevent accidental deletion of important files

brewmacoslinux
Try with needOr install directly
Source

About

Wraps rm to prevent dangerous deletion of files

Commands

safe-rm

Examples

Delete a file safely with confirmation for protected paths$ safe-rm file.txt
Remove multiple files with protection against system directories$ safe-rm oldfile1.log oldfile2.log
Force delete a file while still preventing dangerous operations$ safe-rm -f temporary.tmp