Hacker GitHub

← All repos

andreafrancia/trash-cli

View on GitHub ↗ ★ 4,623 Python

Command line interface to the freedesktop.org trashcan.

15 mentions on Hacker News by 15 people: 1 story, 14 comments · first 2011-12-03 · latest 2026-01-20

Mentions per year 15 mentions · busiest year 2022 (3)
20082026
  1. …of trash CLI and a smarter shell program that prevents deleting critical paths would do it. https://github.com/andreafrancia/trash-cli
    comment by giancarlostoro · 2026-01-20 · in Running Claude Code dangerously (safely)
  2. …I can restore trashed files. However, I haven't found a similar solution that works on Termux. [0] https://github.com/andreafrancia/trash-cli
  3. …suggest you put that into the readme. Otherwise, why should I choose your tool over something like https://github.com/andreafrancia/trash-cli , which seems to already be distributed for the major distros? Does your implementation scratch…
  4. For Linux there's [trash-cli]( https://github.com/andreafrancia/trash-cli/ ). Doesn't seem to work for MacOS per this issue ( https://github.com/andreafrancia/trash-cli/issues/284 ), but it suggests to use https://hasseg.org/trash/
  5. Reminds me somewhat of trash-cli: https://github.com/andreafrancia/trash-cli
  6. I use trash-cli [0] for that. [0] https://github.com/andreafrancia/trash-cli
    comment by BerislavLopac · 2022-09-17 · in $ rm Important.txt (uh oh)
  7. I use trash-cli which implements the freedesktop trash spec: https://github.com/andreafrancia/trash-cli
    comment by cristoperb · 2022-09-17 · in $ rm Important.txt (uh oh)
  8. …doesn't send it to the "Recycle Bin" or your OS's equivalent, it simply deletes it. Use trash-cli: https://github.com/andreafrancia/trash-cli
    comment by pgcj_poster · 2021-04-09 · in You Don't Need a GUI
  9. …that trash items can be restored even with filename collisions. Then it's trash-put my_file.txt [1] https://github.com/andreafrancia/trash-cli
    comment by WCSTombs · 2019-03-17 · in Stop Using `rm` in Bash. Use `del`
  10. …when I've carelessly `rm`d something I shouldn't have. [0] https://github.com/junegunn/fzf [1] https://github.com/andreafrancia/trash-cli - Command Line Interface to FreeDesktop.org Trash.
    comment by insertnickname · 2019-01-14 · in Ask HN: Best things in your bash_profile/aliases?
  11. …Done? This implements the Freedesktop specification, so is compatible with what KDE and Gnome do. https://github.com/andreafrancia/trash-cli
    comment by Symbiote · 2016-04-21 · in NGS: Next Generation Unix Shell
  12. …one restore-trash command from being recovered. Every so often I trash-empty to free up space. [1] https://github.com/andreafrancia/trash-cli
    comment by mintplant · 2016-01-03 · in Accidentally Deleting Everything
  13. ▲ 2
    Trash-cli – Command Line Interface to FreeDesktop.org Trash
    story by srijan4 · 2014-05-20 · 0 comments
  14. ls | grep junk | xargs trash-put https://github.com/andreafrancia/trash-cli/#readme
    comment by rcthompson · 2012-05-14 · in A small primer on xargs
  15. How about replacing rm with something like https://github.com/andreafrancia/trash-cli ? If you only purge the trash when it's necessary and not automatically after every rm, you'd save yourself.
    comment by wahnfrieden · 2011-12-03 · in How do I prevent accidental rm -rf /*?