2025-10-23
Trash-cli — The Recycle Bin on Linux
2025-10-23 ~ 2025-10-23

📘 Overview

On Linux, the command-line tool trash-cli provides a safe alternative to rm, allowing you to move files to the Trash instead of permanently deleting them.
It fully complies with the FreeDesktop Trash Specification, which is used by desktop environments such as GNOME and KDE.


🧰 Installation

You can install trash-cli using your package manager or Python’s pip:

1
2
3
sudo apt install trash-cli
# or
pip install trash-cli

🚫 Disable rm (for safety)

To avoid accidental permanent deletions, you can override the rm command and display a friendly warning instead.