trash-cli
A command-line interface to the FreeDesktop.org trash can for deleting and restoring files safely.
These buttons open the developer's own site, repository or store listing in a new tab. wares.gg does not host downloads.
1 more ways to get trash-cli
Package managers
- Homebrew
brew install trash-cli
About trash-cli
trash-cli moves files to the same trash can that Linux desktop file managers use, instead of deleting them permanently the way rm does. Files sent there can be listed and restored later.
It provides separate commands for each task: trash-put to trash files, trash-list to see what is in the trash, trash-restore to bring files back, trash-rm to remove specific items and trash-empty to clear the trash. It is written in Python and ships with manual pages.
Strengths
- Safer alternative to rm with restorable deletions
- Shares the trash with desktop file managers
- Separate, simple commands for each task
Limitations
- Built around the FreeDesktop.org trash, used mainly on Linux
- Trashed files still use disk space until emptied
Details
- Pricing
- FreeFree and open source.
- License
- Open source, license not stated
- Developer
- Andrea Francia
- Platforms
- Linux, Command line
- How it runs
- Downloadable app
- Account
- Not required
- Works offline
- Yes
- Best suited for
- Linux terminal users who want deletions they can undo
- Categories
- System utilities, CLI tools
- Last verified
- Added
- Provenance
- Facts checked against the developer's own pages and store listings, 1 sources on file.
Alternatives to trash-cli
Compare allSoftware that can replace trash-cli for an important use case, and what changes if you switch.
rip2
A Rust command-line replacement for rm that moves deleted files to a graveyard so you can undo.
rip2 moves deleted files to its own graveyard rather than the FreeDesktop trash, so desktop file managers will not see them, and the graveyard may clear on reboot.
Similar software
Related functionality, not necessarily a direct replacement.
GNU Coreutils
The core GNU file, shell and text utilities, including ls, cp, mv and sort.
fclones
A command-line tool that finds groups of identical files and removes the copies you no longer need.
fdupes
A command-line program that finds duplicate files in chosen directories and can delete them.
rmlint
A fast command-line tool that finds duplicate files, empty directories and other filesystem clutter.
Kondo
A tool that finds and deletes build artifacts and dependency folders from software projects.
xcp
A partial clone of the Unix cp command with progress feedback and optimisations for some copy tasks.