I'm using Debian with the GNOME desktop environment, and I've noticed that trash management isn't as straightforward as I expected. On Windows, everything goes to a common trash folder, but in Linux, it seems each drive has its own hidden trash directory. I tried using the trash-cli software, but it only checks the trash for my user account, which isn't helpful for managing trash on other drives. Is there a GUI or tool that I can install to manage all my trash files? If not, how can I do this via the command line? Ideally, I would love to have an overview of all the trash folders and maybe even a script that automatically deletes items older than a certain number of days.
4 Answers
In Linux, there's no universal trash system. Each desktop environment manages trash differently. For GNOME, it generally handles trash only for files in your home directory. When you delete files from mounted drives, they may just go into their own hidden trash folders, like .Trash-1000. You might want to look into alternatives like a file manager that supports trash across all drives or scripts that can help with that.
It depends on the file manager you use. For instance, in Cinnamon, the Nemo file manager creates a .Trash directory in each mounted filesystem. If you want a broader overview, consider using GUI tools that can help manage those hidden directories more effectively.
I prefer using the command line for deleting files too, mainly with `rm -rf`, so I don't really use trash at all. But if you’re looking for a better trash management solution, you might want to explore 'trash-cli' or similar tools that can help manage deleted files across multiple drives.
Just so you know, some tools like `trash-empty` can work across mounted drives and help empty those hidden trash directories for you.
Keep in mind that the trash system varies between environments. Even in Windows, there's a hidden $Recycle.Bin folder on each drive. Linux might not seem as intuitive, but it's just a matter of getting used to the differences!

Yeah, I had a similar issue. I've found that certain file managers like Nemo in Cinnamon can manage trash across different drives better. Maybe give those a try!