gtrash
Featureful trash CLI manager and safe rm alternative
TLDR
SYNOPSIS
gtrash command [options] [arguments]
DESCRIPTION
gtrash is a featureful trash CLI manager that serves as a safer alternative to rm. Instead of permanently deleting files with the unlink syscall, it moves them to the system trash using the rename syscall, enabling easy restoration. It follows the FreeDesktop.org Trash specification, making it compatible with desktop trash implementations and other tools like gio trash and trash-cli.
Key features include directory size caching for fast browsing, restoration of co-deleted files, an interactive TUI for selecting files to restore, and support for external drives with per-volume trash directories.
PARAMETERS
put
Move files to trashfind
List files in trash (supports --rm to permanently delete matches)restore
Interactively restore files from trash using TUIsummary
Show trash size summaryprune
Remove old files from trash--day N
Used with prune to specify age threshold in days--rm
Used with find to permanently delete matching files
CAVEATS
Files moved to trash still consume disk space until pruned or permanently deleted. The rename syscall used for trashing only works within the same filesystem; cross-filesystem moves require copying. Permanently deleting with --rm is irreversible, similar to rm.
HISTORY
gtrash was created by umlx5h as a modern, feature-rich alternative to both rm and existing trash managers. It is written in Go and distributed as a single static binary.

