osx-trash

Move files to trash instead of permanently deleting them with rm

brewmacoslinux
Try with needOr install directly
Source

About

Allows trashing of files instead of tempting fate with rm

Commands

trash

Examples

Safely remove a single file to trash$ trash myfile.txt
Move multiple files to trash$ trash file1.txt file2.txt file3.txt
Remove a directory and its contents safely$ trash -r mydirectory/