# Install macos-trash with Homebrew, MacPorts

Move files and folders to the trash. Version 3.0.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:macos-trash
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install macos-trash
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install macos-trash
```

  Evidence: MacPorts ports tree: sysutils/macos-trash/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:macos-trash
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/macos-trash>
- **Version:** 3.0.0
- **Source summary:** Move files and folders to the trash
- **Homepage:** <https://github.com/sindresorhus/macos-trash>
- **Repository:** <https://github.com/sindresorhus/macos-trash>
- **Upstream docs:** <https://github.com/sindresorhus/macos-trash#readme>
- **License:** MIT
- **Source archive:** <https://github.com/sindresorhus/macos-trash/archive/refs/tags/v3.0.0.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- trash (cli)
- trash (alias)

## Uses from macOS

- swift

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 3.0.0
- Local data: ok
- Upstream repository: https://github.com/sindresorhus/macos-trash
- Upstream latest detected: v3.0.0 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

macos-trash is a Swift command-line tool that moves files and folders to the macOS Trash instead of deleting them directly.

### Project history

The official repository was created in January 2015. The current README describes a macOS 13-or-later utility and notes that, although macOS 15 added a built-in `trash` command, this package still provides an interactive flag and fixes Put Back behavior.

### Adoption history

The README documents installation through Homebrew, Mint, and manual binary download, while the batch input records Homebrew and MacPorts packaging. Repository metadata captured during this run showed hundreds of GitHub stars, reflecting steady interest in safer command-line deletion on macOS.

### How it is used

The documented CLI shape is `trash [--help | -h] [--version | -v] [--interactive | -i] <path> ...`. The README also suggests aliasing `rm` to `trash` for users who want a safer default in their shell.

### Why package nerds care

macos-trash fills the long-standing gap between Unix `rm` and Finder's Trash. For package users, it is the kind of small native CLI that makes scripts safer while preserving macOS-specific behavior such as recoverable trash items.

### Timeline

- 2015: Official GitHub repository created.
- 2024: macOS 15 introduced a built-in `trash` command, according to the project README.
- 2026: Repository activity continued through commits pushed to the default branch.

### Related projects

- The README links related projects including the cross-platform Node.js `trash`, `empty-trash`, `macos-wallpaper`, and `do-not-disturb`.

### Sources

- <https://api.github.com/repos/sindresorhus/macos-trash>
- <https://github.com/sindresorhus/macos-trash>
- <https://github.com/sindresorhus/macos-trash#readme>
- source_facts.package-manager


## Security Notes

No matching local secret-handling manifest was found for macos-trash. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** macos-trash
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Conflicts With:** osx-trash, trash, trash-cli
- **Requirements:** macos, xcode
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** yes
- **URL Keys:** head, stable

## Other Package-Manager Records

- MacPorts - macos-trash: normalized package name match | MacPorts ports tree: sysutils/macos-trash/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- MacPorts - trash: installed executable or alias match | MacPorts ports tree: sysutils/trash/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/pkg/brew-utility-packages/) - Matched curated package taxonomy and local package facts.
- [trash-cli](https://www.automicvault.com/pkg/npm/trash-cli/) - Executable or command metadata overlaps with this package. Shared terms: files, folders, move, trash.
- [rmtrash](https://www.automicvault.com/pkg/brew/rmtrash/) - Local package facts share a topical domain. Shared terms: files, move, trash.
- [fileicon](https://www.automicvault.com/pkg/brew/fileicon/) - Local package facts share a topical domain. Shared terms: files, folders.

## Combined YAML source

View the package source record on GitHub. [combined/macos-trash.yml](https://github.com/automic-vault/db/blob/main/combined/macos-trash.yml)


## Sources

- Nucleus package database
- package-page enrichment
- curated package history
- package version freshness
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
