andreafrancia/trash-cli

Command line interface to the freedesktop.org trashcan.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 12 minutes ago
Added to GitGenius on September 15th, 2026
Created on November 9th, 2011
Open Issues & Pull Requests: 84 (+0)
GitHub issues: Enabled
Number of forks: 212
Total Stargazers: 4,593 (+0)
Total Subscribers: 32 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 8.4 days
Mean response time: 205.0 days
90th percentile: 673.1 days
Tracked items: 33

Most active contributors

Sign in to see contributor activity.

How this project is maintained

96% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Three people close 100% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 24
New in 7 days: 1
Closed in 7 days: 1
Avg open age: 760 days
Stale 30+ days: 21
Stale 90+ days: 16

Recent activity

Opened in 7 days: 1
Closed in 7 days: 1
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • trash-put (2)
  • force-volume (1)
  • help-wanted (1)

Most active issues this week

Sign in to see which issues are moving.

Detailed Description

trash-cli is a command line interface to the freedesktop.org trashcan that lets you safely delete files from the terminal while preserving recovery options.

The tool solves the problem of permanent data loss when using rm from scripts or the command line. Instead of immediately deleting files, trash-cli moves them to the system trashcan used by KDE, GNOME, and XFCE, recording the original path, deletion date, and file permissions. This approach integrates with the desktop environment's trash mechanism rather than creating a separate deletion system, so files deleted via trash-cli appear in the same recovery interface as files deleted through graphical file managers.

The tool suits developers and system administrators who want safer deletion semantics in shell scripts and interactive terminal sessions. It is particularly valuable for those who frequently work with command-line tools but want the safety net of a recoverable trash rather than permanent deletion. The project provides five core commands: trash-put to delete files, trash-list to view trashed items with timestamps and original paths, trash-restore to recover files with interactive selection, trash-empty to permanently purge the trash with optional age-based filtering, and trash-rm to remove specific files from the trash. The restore command supports batch recovery of multiple files using range notation and can overwrite existing files during restoration.

The project maintains a stable, long-running codebase with infrequent but deliberate updates focused on bug fixes and compatibility improvements rather than feature expansion. Development activity shows careful attention to edge cases and user-reported issues, with changes typically addressing specific problems in trash handling across different Linux distributions and desktop environments. The tool has established itself as a mature utility with straightforward maintenance patterns and a clear scope that has remained consistent over time.