trasher
trash is a small rm-like CLI that moves files/directories into the macOS Trash instead of deleting them.
Install (dev / editable)
python3 -m pip install -e .
If your trash executable isn’t found after installing, make sure your Python “scripts” directory is on PATH
(for the python.org installer this is often /Library/Frameworks/Python.framework/Versions/<ver>/bin).
Usage
trash some-file.txt
trash -r some-directory/
trash -rf build/ dist/
trash -i important.txt
trash --dry-run -rv *
If trash is already taken on your system, use trasher (installed by this project) or adjust your PATH so this project’s trash resolves first.
Notes
- By default, items are moved into the appropriate macOS Trash folder:
- Same volume as your home:
~/.Trash - Other volumes:
<volume>/.Trashes/<uid>/
- Same volume as your home:
- When run via
sudo, the tool uses the invoking user’s Trash (viaSUDO_UID/SUDO_USER) when available. - If
sudo trash ...can’t find the executable, usesudo $(which trash) ...or add the install location tosudo’ssecure_path. - This tool moves items to Trash for recovery, but Finder “Put Back” metadata is not guaranteed.
Metadata
Release files for trasher 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| trasher-0.1.0.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| trasher-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / trasher-0.1.0.tar.gz
| Download URL | trasher-0.1.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bca5a8151dc3e415bed2f029bf6ba709286592f28c78bafc544a7f6ed14ed97
|
|
BLAKE2b-256 checksum How to use checksums |
64ba7444e0f9a8b615af05dc701466b5ef5eb0a2ec179da91cded87b49f921e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / trasher-0.1.0-py3-none-any.whl
| Download URL | trasher-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f9d3dd67d933a97e890058ec04149f550f9cec47c4f5de58e18619f4d8ba169
|
|
BLAKE2b-256 checksum How to use checksums |
dece67e2827f76b49ce9b8cd8c8058f33588b359f847e44c6fef777a4e2b47bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|