This would be great especially considering the latest version of Ubuntu is very slow when displaying directories on my PC...


At least in Debian and Ubuntu, you can install the trash-cli package. This provides a number of commands for working with FreeDesktop.org Trash Specification compliant trash cans, like GNOME's.


To remove all trashed files, use emtpy-trash. It can also just remove files that have been in the trash more than a certain number of days. Use empty-trash x, where "x" represents the number of days.

I personally have set up a cron job that runs daily to get rid of trash over a week old.

  • that's a great answer.
    – ixtmixilix
    Oct 14 '10 at 0:05

There is no such thing like a system trash in Linux, but its common for many desktop environments to use ~/.Trash as trash folder. This depends on the window manager you are using.

For Gnome you can empty this folder with: rm -rf ~/.Trash/*

  • 1
    I suspect the window manager has little to do with what folder is used for trash storage, but I know what you meant :) Oct 10 '10 at 22:41
  • 4
    On my gnome system the trash is found in ~/.local/share/Trash.
    – Steven D
    Oct 11 '10 at 4:16
  • 3
    That is only true if all your stuff is on one partition. Every drive/partition has its own trash (wouldn't make sense to move a multiple GB file over to a different drive to store it in the trash)
    – tante
    Oct 11 '10 at 8:37
  • Oh, I wasn't aware of multiple partitions :-) @Steven D: what gnome version are you using? maybe this has changed or is partly distribution specific...
    – echox
    Oct 11 '10 at 9:12
  • 1
    I wonder if this trash-spec would help creating a more generic solution?
    – livibetter
    Oct 11 '10 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.