trash-cli
Move files and directories to the trash.
The tool provides a command‑line interface for moving files and directories to the system trash instead of permanently deleting them. It works on macOS (10.12+), Linux and Windows (8+), accepting individual paths or glob patterns, with options to match dotfiles and to output verbose information about the items being trashed. By routing deletions through the operating system’s recycle mechanism, the operation becomes reversible and safer than using the traditional `rm` command.
Typical users are developers and system administrators who prefer a quick, scriptable way to discard files without risking data loss. The utility can be installed globally via npm and invoked as `trash`, with examples such as `trash unicorn.png` or `trash '*.png' '!unicorn.png'`. An optional alias (`alias rm=trash`) can replace the default `rm` command in shell configuration files to encourage safer habits.
The package is marked as stable and includes core CLI availability, making it suitable for inclusion in automation scripts or interactive shell sessions where a reliable, cross‑platform trash operation is needed.
Reviews
Loading reviews…
Similar apps
File Management & Transfer
empty-trash-cli
Empty the trash.
File Management & Transfer
del-cli
Delete files and folders.
Terminals & CLI
fkill-cli
Simple cross-platform process killer.
Terminals & CLI
kill-tabs
Kill all Chrome tabs.
Terminals & CLI
hasha-cli
Get the hash of text or stdin.
Terminals & CLI
wipe-modules
Remove `node_modules` of inactive projects.