Delete files safely with trash-cli
Send files to the desktop trash instead of destroying them with rm — recoverable until you empty it.
01Command
$ trash-put old-drafts/ && trash-list && trash-restore02What it does
rm is forever: there is no recycle bin at the shell. trash-cli implements the freedesktop trash spec, so files deleted with trash-put appear in the same trash your file manager uses. trash-list shows contents with original paths and deletion times, trash-restore walks you through putting items back, and trash-empty purges everything.
03Risk
04Undo
$ trash-restore (picks a trashed item and puts it back)05Sources
- Trash management — Arch WikiEvidence: Documents the freedesktop.org trash specification and trash-cli tools (trash-put, trash-list, trash-restore) as the safe-deletion workflow on Linux.
Last verified: 2026-09-18 · Category: Files & Folders
06Related solutions
Find every occurrence of a pattern across all files in a tree, printed as file:line:number matches.
Unpack a gzipped tarball into the current directory while printing each file as it is extracted.
Show total, used, and available space plus usage percentage for every mounted filesystem in human-readable units.