# trash-cli mit Homebrew, apk, apt, dnf, Nix, pacman, zypper, MacPorts installieren

Prüfe Installationswege, Executables, Metadaten und Sicherheitshinweise für trash-cli in AI-Agent-Workflows.

## Installation

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

Weitere Installationsbefehle:

### macOS

- Homebrew (100%):

```sh
brew install trash-cli
```

  Evidenz: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install trash
```

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

### Linux

- apk (92%):

```sh
sudo apk add trash-cli
```

  Evidenz: Alpine Linux edge package indexes: trash-cli from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install trash-cli
```

  Evidenz: Debian stable package indexes: trash-cli from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install trash-cli
```

  Evidenz: Fedora Rawhide package metadata: trash-cli from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#trash-cli
```

  Evidenz: nixpkgs package indexes: pkgs/by-name/tr/trash-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S trash-cli
```

  Evidenz: Arch Linux sync databases: trash-cli from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install trash-cli
```

  Evidenz: openSUSE Tumbleweed package metadata: trash-cli from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## Paketfakten

- **Paketschlüssel:** brew:trash-cli
- **Paketmanager:** Homebrew
- **Version:** 0.24.5.26
- **Quellzusammenfassung:** Command-line interface to the freedesktop.org trashcan
- **Homepage:** <https://github.com/andreafrancia/trash-cli>
- **Repository:** <https://github.com/andreafrancia/trash-cli>
- **Generiert:** 2026-08-03T19:37:03+00:00

## Executables

- trash (Alias)
- trash-empty (Alias)
- trash-list (Alias)
- trash-put (Alias)
- trash-restore (Alias)
- trash-rm (Alias)

## Installationsverhalten

- Bottle: nicht verfügbar

## Version und Aktualität

- Seite generiert: 2026-08-03
- Manager-Version: 0.24.5.26
## Projektgeschichte und Nutzung

trash-cli is a Python command-line interface to the freedesktop.org trash can. Its README describes a suite of commands for moving files to trash, listing trashed files, restoring them, emptying trash, and removing matching trashed entries while preserving metadata such as original path, deletion date, and permissions.

### Projektgeschichte

The project grew out of the Unix command-line gap between irreversible `rm` and desktop trash implementations. The official README frames trash-cli as a command-line and scripting interface to the same trash can used by KDE, GNOME, and XFCE, making desktop-style file recovery available from shells and scripts.

GitHub repository metadata identifies `andreafrancia/trash-cli` as an official source repository created in 2011, while the README examples still show older usage dates from 2007 and 2008. The project has continued to publish tagged versions and maintain Python packaging instructions, with the README recommending pipx or pip, source installs from Git, and distro package managers.

### Adoptionsgeschichte

trash-cli moved from being a convenience wrapper for freedesktop.org trash semantics into a broadly packaged Unix utility. The official README lists package-manager installation commands for Debian/Ubuntu, Arch Linux, and Fedora, and the batch input additionally records availability in Homebrew, apk, Debian, dnf, MacPorts, Nix, pacman, Ubuntu, and zypper.

The package's adoption is tied to cross-desktop Linux behavior: by using the freedesktop.org trash location and metadata model, it fits systems where graphical file managers and command-line tools need to see the same trash state.

### Wie es verwendet wird

Typical use is replacing ad hoc destructive cleanup with explicit trash operations: `trash-put` sends files or directories to the trash, `trash-list` supports shell filtering, `trash-restore` interactively restores entries, `trash-empty` clears trash or old entries, and `trash-rm` removes trashed files matching patterns.

The README explicitly warns against aliasing `rm` directly to `trash-put` because the commands have different semantics, including directory handling. Instead it suggests using shell aliases that remind users not to run `rm`, and it documents cron-based automatic deletion with `trash-empty 30`.

### Warum Paket-Nerds sich dafür interessieren

For package-manager users, trash-cli is the portable Linux answer to safer deletion from scripts and terminals. It matters because it integrates with the desktop trash standard rather than inventing a private holding directory, so it can be packaged once and behave consistently across common Unix desktops.

The formula is also a good example of a small CLI whose executable surface is intentionally split into subcommands, making it easy for downstream packagers and shell users to expose focused tools instead of one large interactive program.

### Zeitleiste

- 2007-2008: README examples show early trash-list and trash-empty workflows.
- 2011: Official GitHub repository metadata records creation of `andreafrancia/trash-cli`.
- 2020s: README documents pipx, pip, Git source installs, and distribution package-manager installs.

### Related projects

- Related to freedesktop.org trash implementations used by KDE, GNOME, and XFCE.
- Contrasts with `rm`, which permanently unlinks files rather than recording trash metadata for recovery.
- Complements macOS-specific tools such as Ali Rantakari's `trash`, which targets Finder and macOS Trash behavior.

### Quellen

- Batch input fields: source_facts.description, source_facts.executables, source_facts.package-manager
- Official GitHub repository metadata: https://github.com/andreafrancia/trash-cli
- Official README: https://github.com/andreafrancia/trash-cli#readme


## Sicherheitshinweise

narrow executable package without higher-risk signals.

- **Geiger-Risiko:** grün / niedrig
- narrow executable package without higher-risk signals

## Andere Paketmanager-Einträge

- Debian apt - trash-cli - 0.24.5.26-0.3: normalized package name match | Debian stable package indexes: trash-cli from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | command line trashcan utility | https://github.com/andreafrancia/trash-cli
- Nix - trash-cli: normalized package name match | nixpkgs package indexes: pkgs/by-name/tr/trash-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - trash-cli - 0.23.11.10-1: normalized package name match | Ubuntu 24.04 LTS package indexes: trash-cli from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command line trashcan utility | https://github.com/andreafrancia/trash-cli
- apk - trash-cli - 0.24.5.26-r1: normalized package name match | Alpine Linux edge package indexes: trash-cli from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Command line interface to the freedesktop.org trashcan | https://github.com/andreafrancia/trash-cli
- apk - trash-cli-doc - 0.24.5.26-r1: normalized package name match | Alpine Linux edge package indexes: trash-cli-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Command line interface to the freedesktop.org trashcan (documentation) | https://github.com/andreafrancia/trash-cli
- apk - trash-cli-pyc - 0.24.5.26-r1: normalized package name match | Alpine Linux edge package indexes: trash-cli-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for trash-cli | https://github.com/andreafrancia/trash-cli
- dnf - trash-cli - 0.24.5.26-21.fc45: normalized package name match | Fedora Rawhide package metadata: trash-cli from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Command line interface to the freedesktop.org trashcan | https://github.com/andreafrancia/trash-cli
- pacman - trash-cli - 0.24.5.26-3: normalized package name match | Arch Linux sync databases: trash-cli from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Command line trashcan (recycle bin) interface | https://github.com/andreafrancia/trash-cli
- zypper - trash-cli - 0.24.5.26-1.5: normalized package name match | openSUSE Tumbleweed package metadata: trash-cli from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Command line interface to the freedesktop.org trashcan | https://github.com/andreafrancia/trash-cli
- 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


## Combined YAML source

View the package source record on GitHub. [combined/trash-cli.yml](https://github.com/mxcl/pkgdb/blob/main/combined/trash-cli.yml)


## Quellen

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
