Just because you're at the command line doesn't mean you can't use the safe Mac Trash.


Move files to your Macintosh trash can.

I wrote this to demonstrate simple functionality for command-line development including flag-like support and some decent user feedback.

Based on user feedback, I created a separate branch (more complicated) that uses AppleScripting so you can take advantage of the Trash Can's "Put Back" feature. Since this falls outside the scope of my sample code, it's available from the script branch and not main. Installation notes for both follow.


  • Install homebrew.
  • Install mint with homebrew (brew install mint).
  • From command line: mint install erica/trash or mint install erica/trash@script The latter installs the scripting version.

Build notes

  • This project includes a build phase that writes to /usr/local/bin
  • Make sure your /usr/local/bin is writable: chmod u+w /usr/local/bin


  • Swift Tools 5.1.0
View More Packages from this Author


  • None
Last updated: Sat May 27 2023 16:31:29 GMT-0900 (Hawaii-Aleutian Daylight Time)