Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

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.

/usr/bin/trash
/usr/bin/list-trash
/usr/bin/restore-trash
/usr/bin/empty-trash

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.

share|improve this answer
    
that's a great answer. –  ixtmixilix Oct 14 '10 at 0:05
add comment

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/*

share|improve this answer
1  
I suspect the window manager has little to do with what folder is used for trash storage, but I know what you meant :) –  Michael Mrozek Oct 10 '10 at 22:41
2  
On my gnome system the trash is found in ~/.local/share/Trash. –  Steven D Oct 11 '10 at 4:16
2  
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
    
I wonder if this trash-spec would help creating a more generic solution? –  livibetter Oct 11 '10 at 11:26
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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