Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

12
  • 26
    && is your lifeline. ; is the devil. P.S. The answer is that pretty much everything on your system disappears, in the above example. Commented Jul 20, 2011 at 8:06
  • 2
    Debian/Ubuntu users install trash-cli instead, ex. aptitude install trash-cli - see github.com/andreafrancia/trash-cli Commented Feb 18, 2016 at 1:44
  • 6
    @jm666 Also check out trash (blog post & source). It asks Finder for trashing files. Moreover it can also use standard Objective C filesystem APIs (faster) and fallback to Finder if insufficient rights. brew install trash Commented Jul 5, 2017 at 5:29
  • 4
    rmtrash is really old, having been last updated in 2003, and it shows. It has many fewer options than rm, and if you say rmtrash on a secondary volume it moves those files to your user's trash folder on the system drive, which can take a long time for large files. The trash option recommended by parth is better, solving the keep-on-same-volume problem, but still missing many rm options. Commented Jan 28, 2018 at 1:58
  • 12
    For those on macOS: rmtrash is no longer to be found on homebrew, so I recommend installing trash instead: brew install trash. Commented Nov 23, 2020 at 10:38