# 使用 Homebrew, MacPorts 安装 macos-trash

查看 macos-trash 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

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

  证据: local Homebrew formula metadata

- MacPorts (94%):

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

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

## 软件包事实

- **软件包键:** brew:macos-trash
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/macos-trash>
- **版本:** 3.0.0
- **来源摘要:** Move files and folders to the trash
- **主页:** <https://github.com/sindresorhus/macos-trash>
- **仓库:** <https://github.com/sindresorhus/macos-trash>
- **上游文档:** <https://github.com/sindresorhus/macos-trash#readme>
- **许可证:** MIT
- **源码归档:** <https://github.com/sindresorhus/macos-trash/archive/refs/tags/v3.0.0.tar.gz>
- **已生成:** 2026-07-08T07:18:31+00:00

## 可执行文件

- trash (cli)
- trash (别名)

## macOS 提供的库

- swift

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 3.0.0
- 本地数据: OK
- 上游仓库: https://github.com/sindresorhus/macos-trash
- 检测到的最新版本: v3.0.0 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

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

### 项目历史

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.

### 采用历史

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.

### 使用方式

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.

### 为什么软件包爱好者会关心

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.

### 时间线

- 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`.

### 来源

- <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


## 安全说明

没有找到 macos-trash 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 源数据库详情

- **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

## 其他软件包管理器记录

- 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


## 相关链接

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


## 来源

- 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
