What is the shell command to empty the garbage bin under Linux?

link|improve this question
feedback

3 Answers

Except for the ~/.local/share/Trash trash files for other file systems may be stored in <mount-point>/.Trash-$(id -u) directories. If your're running ubuntu there is a helper package to clean all locations

sudo aptitude install trash-cli

To clean the trash in all locations just run:

empty-trash

It should work with any linux desktop environment compliant with FreeDesktop.org Trash Specification.

link|improve this answer
Good point. More info here: manpages.ubuntu.com/manpages/lucid/man1/empty-trash.1.html – Linker3000 Oct 15 '10 at 9:50
feedback
rm -rf /home/YOURUSERNAME/.local/share/Trash/files

If not under .local/share, it may be under /home/YOURUSERNAME/.Trash

link|improve this answer
Thanks for your answer, but in .local/share/ I have just "applications" and "mime", no Trash to be found :(. – Rob Oct 15 '10 at 9:35
OK - have a look for /home/YOURUSERNAME/.Trash – Linker3000 Oct 15 '10 at 9:39
Many thanks, that was it ;) – Rob Oct 15 '10 at 10:05
feedback

In case you would like to empty the trash of the currently logged in user:

rm -rf ~/.local/share/Trash/files/*
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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