macOS
brew install trash-clilocal Homebrew formula metadata
brew
trash-cli のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。
インストール
brew install trash-clilocal Homebrew formula metadata
sudo apk add trash-cliAlpine Linux edge package indexes · trash-cli · ソース: dl-cdn.alpinelinux.org
sudo apt install trash-cliDebian stable package indexes · trash-cli · ソース: deb.debian.org
sudo dnf install trash-cliFedora Rawhide package metadata · trash-cli · ソース: dl.fedoraproject.org
nix profile install nixpkgs#trash-clinixpkgs package indexes · pkgs/by-name/tr/trash-cli/package.nix · ソース: api.github.com
sudo pacman -S trash-cliArch Linux sync databases · trash-cli · ソース: geo.mirror.pkgbuild.com
sudo zypper install trash-cliopenSUSE Tumbleweed package metadata · trash-cli · ソース: download.opensuse.org
概要
Command-line interface to the freedesktop.org trashcan
履歴
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.
セキュリティ状態
narrow executable package without higher-risk signals.
リスク グリーン · 信頼度 低 · appliance
エージェントに無人実行させる前に、このツールが平文の認証情報を読むか、リモート状態を書き込むか、成果物を公開するか、プラグインを起動するかを確認してください。
実行可能ファイル
| コマンド | 種類 | 公開範囲 | メモ |
|---|---|---|---|
trash-empty | cli | グローバル実行可能ファイル | |
trash-list | cli | グローバル実行可能ファイル | |
trash-put | cli | グローバル実行可能ファイル | |
trash-restore | cli | グローバル実行可能ファイル | |
trash-rm | cli | グローバル実行可能ファイル |
鮮度
これらの信号は、ページ生成時期、パッケージマネージャの活動、上流リリース比較を分けて示します。バージョン遅れは、証拠 URL と比較可能なバージョンがある場合だけ警告されます。
https://github.com/andreafrancia/trash-cli
インストールメタデータ
| パッケージキー | brew:trash-cli |
|---|---|
| バージョン | 0.24.5.26 |
| パッケージマネージャ | Homebrew |
| パッケージマネージャページ | https://formulae.brew.sh/formula/trash-cli |
| ホームページ | https://github.com/andreafrancia/trash-cli |
| リポジトリ | https://github.com/andreafrancia/trash-cli |
| 上流ドキュメント | https://github.com/andreafrancia/trash-cli#readme |
| ライセンス | GPL-2.0-or-later |
| ソースアーカイブ | https://files.pythonhosted.org/packages/f7/6c/d51b36377c35e4f9e69af4d8b61a920f26251483cdc0165f5513da7aefeb/trash_cli-0.24.5.26.tar.gz |
| 依存関係 | python@3.14 |
| Bottle | 利用可能 (対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定義 |
| サービス | 宣言なし |
レジストリ情報
| 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 |
|
ソースデータベース一致
一致は外部パッケージマネージャインデックスから取得され、ローカルの Automic Vault パッケージリンクとは分けて表示されます。
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-cliソース経路
このページは scripts/generate-pkg-sqlite.py が生成した非公開のパッケージ SQLite アーティファクトから av-web によって提供されます。
View the package source record on GitHub.