macos-trash
February 25, 2026 · View on GitHub
Move files and folders to the trash
Requires macOS 13 or later.
Since macOS 15, there is now a built-in trash command. The benefit of the binary here is that it has a --interactive flag and it fixes “Put Back” being broken.
Install
Homebrew
brew install macos-trash
Mint
mint install sindresorhus/macos-trash
Manually
Download the binary and put it in /usr/local/bin.
Usage
trash [--help | -h] [--version | -v] [--interactive | -i] <path> […]
Tips
Use it as an rm alias
In your .bashrc or similar:
alias rm='trash'
Works as a drop-in replacement. All rm flags are ignored.
Build
./build
Related
- trash - Cross-platform Node.js version
- empty-trash - Empty the trash
- macos-wallpaper - Manage the desktop wallpaper
- do-not-disturb - Control the macOS
Do Not Disturbfeature - More…