macOS
brew install trash-clilocal Homebrew formula metadata
brew
Command-line interface to the freedesktop.org trashcan. Version 0.24.5.26 via Homebrew; verified from local package data.
install
brew install trash-clilocal Homebrew formula metadata
sudo apk add trash-cliAlpine Linux edge package indexes · trash-cli · source: dl-cdn.alpinelinux.org
sudo apt install trash-cliDebian stable package indexes · trash-cli · source: deb.debian.org
sudo dnf install trash-cliFedora Rawhide package metadata · trash-cli · source: dl.fedoraproject.org
nix profile install nixpkgs#trash-clinixpkgs package indexes · pkgs/by-name/tr/trash-cli/package.nix · source: api.github.com
sudo pacman -S trash-cliArch Linux sync databases · trash-cli · source: geo.mirror.pkgbuild.com
sudo zypper install trash-cliopenSUSE Tumbleweed package metadata · trash-cli · source: download.opensuse.org
overview
Command-line interface to the freedesktop.org trashcan
history
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.
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.
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.
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`.
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.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
trash-empty | cli | global executable | |
trash-list | cli | global executable | |
trash-put | cli | global executable | |
trash-restore | cli | global executable | |
trash-rm | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/andreafrancia/trash-cli
install metadata
| Package key | brew:trash-cli |
|---|---|
| Version | 0.24.5.26 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/trash-cli |
| Homepage | https://github.com/andreafrancia/trash-cli |
| Repository | https://github.com/andreafrancia/trash-cli |
| Upstream docs | https://github.com/andreafrancia/trash-cli#readme |
| License | GPL-2.0-or-later |
| Source archive | https://files.pythonhosted.org/packages/f7/6c/d51b36377c35e4f9e69af4d8b61a920f26251483cdc0165f5513da7aefeb/trash_cli-0.24.5.26.tar.gz |
| Dependencies | python@3.14 |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | trash-cli |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Conflicts With |
|
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | yes |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
trash-cli 0.24.5.26-0.3
command line trashcan utility
https://github.com/andreafrancia/trash-cli
sudo apt install trash-clitrash-cli
nix profile install nixpkgs#trash-clitrash-cli 0.23.11.10-1
command line trashcan utility
https://github.com/andreafrancia/trash-cli
sudo apt install trash-clitrash-cli 0.24.5.26-r1
Command line interface to the freedesktop.org trashcan
https://github.com/andreafrancia/trash-cli
sudo apk add trash-clitrash-cli-doc 0.24.5.26-r1
Command line interface to the freedesktop.org trashcan (documentation)
https://github.com/andreafrancia/trash-cli
sudo apk add trash-cli-doctrash-cli-pyc 0.24.5.26-r1
Precompiled Python bytecode for trash-cli
https://github.com/andreafrancia/trash-cli
sudo apk add trash-cli-pyctrash-cli 0.24.5.26-20.fc45
Command line interface to the freedesktop.org trashcan
https://github.com/andreafrancia/trash-cli
sudo dnf install trash-clitrash-cli 0.24.5.26-3
Command line trashcan (recycle bin) interface
https://github.com/andreafrancia/trash-cli
sudo pacman -S trash-clitrash-cli 0.24.5.26-1.4
Command line interface to the freedesktop.org trashcan
https://github.com/andreafrancia/trash-cli
sudo zypper install trash-clisource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.