# trash

> Small command-line program for OS X that moves files or folders to the trash

Source: https://talira.ai/catalog/trash-625g3m2e
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [system utilities / trash](https://talira.ai/categories/system-utilities/trash), [developer tools / macos](https://talira.ai/categories/developer-tools/macos)
- Platforms: macos, cli[^3]
- Licence: MIT[^2][^3]
- Pricing: Free and open source[^2][^3]
- Free tier: yes[^2][^3]
- Self-hostable: yes[^2]
- Creator: Ali Rantakari

trash is a small command-line program for [macOS](https://talira.ai/catalog/macos-8swyggxb.md) by Ali Rantakari that moves files or folders to the Trash instead of deleting them, so they can be recovered. By default it uses the low-level system API; with -F it asks Finder to do the trashing, so Finder's Put Back works. It is the program [Homebrew](https://talira.ai/catalog/homebrew-djy17yn9.md)'s trash formula installs.

## Links

- Website: https://hasseg.org/trash/
- GitHub: https://github.com/ali-rantakari/trash

## Ways to install

### Package managers

- [Homebrew](https://talira.ai/catalog/homebrew-djy17yn9.md): <https://formulae.brew.sh/formula/trash>[^1]

## Problems it solves

- rm deletes files forever and I want to move them to the Mac Trash from the terminal instead
- delete files in a script on macOS but still be able to recover them later
- trash files from the command line so Finder's Put Back still works
- a safer replacement for rm in my shell aliases on macOS
- empty-able deletes from the terminal that land in the same Trash as Finder

## Features

- moves files and folders to the macOS Trash
- -F asks Finder to trash files so Put Back works
- man page

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.23 out of 1.
Signals: maintenance 0.06, adoption 0.56, momentum 0.21, community 0.28, backing 0.20, extensibility 0.20.

- 648 GitHub stars
- 4 contributors
- created by Ali Rantakari

Warnings:

- last commit 3.9 years ago

## Sources

[^1]: https://formulae.brew.sh/api/formula.json (checked 21 Nov 2026)
[^2]: https://github.com/ali-rantakari/trash (checked 19 Nov 2026)
[^3]: https://hasseg.org/trash/ (checked 19 Nov 2026)
