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

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
Last verified
Added
Provenance
Facts checked against the developer's own pages and store listings, 1 sources on file.

Alternatives to trash-cli

Compare all

Software 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.

Report a wrong fact or a dead link on this listing