8

Well title says all. As there is no use of this feature for me I want to disable this feature whenever I delete is stays it stays in .Trash folder of a device e.g. Pendrive and with time it start to take space in GB's. How can i disable it.

  • Everytime time you "delete" something is sent to a Trash folder, empty the trash each time before removing your device. – Uri Herrera Dec 14 '12 at 19:43
  • 1
    I am interested in a solution which turns off recycle bins for removeable media at all... – Hartmut P. Mar 23 '13 at 9:19
  • Another scenario is when sharing folders in a VM. Ubuntu 13.04 in a VM sees my Windows host folder as a device and creates ".Trash-1000" in it (the shared folder is writeable for my workflow, so making it read only is not a solution). I used to be able to share a folder without it appearing in devices, but can't remember how this worked. – Bleep Bloop Jan 9 '14 at 16:42
8

If you permanently delete something, it will not create a .Trash folder and put it there. To do this in Nautilus (the default file browser in Ubuntu), simply hold the Shift key while pressing delete. This will bypass the Trash, which is similar to the Recycling Bin in Windows and allows undeleting.

You can also add a Delete right-click command which bypasses trash in Nautilus. To do this, open Nautilus and select Edit -> Preferences. Then click the Behavior tab, and select "Include a Delete command that bypasses Trash".

Also, as Uri Herrera mentioned, you can empty the trash to remove it.

| improve this answer | |
  • Doing "Empty Trash" removed the files inside the trash folder, but the Trash folder is still there. This is rather dumb. Linux should store its own trash folder in its own partition instead of storing it on the windows partition or on some external device's partition. – Nav Jan 2 '16 at 5:40
  • It stores it on whatever partition it's deleted from. Why would you move deleted items from one drive to another to put them in a recycle bin? That doesn't make any sense. – reverendj1 Jan 3 '16 at 6:25
  • Hmm...that's true. I realized that what I didn't actually like, was that the Trash folder remains even after trash is cleared. So let the Trash folder be on any drive; but when the trash is cleared, the folder should disappear. – Nav Jan 5 '16 at 16:55
2

I too am one of those who have been bugged by this problem for a number of years ... unsatisfied with the existing proposals, I've recently taken the time to investigate a solution myself. If you can live with the fact that the following describes how to disable Gnome's trash globally (i.e. not only for removable devices), then the linked tutorial may just be for you.

Starting with the premise that I want the Trash to be gone system-wide, I've found that -- for the time being -- the only real solution is to create a custom-compiled version of libgioGIO) which is modified to call g_file_delete() every time an application calls g_file_trash().

For all technology savvy users interested in this solution: I've just recently posted a step-by-step guide on GitHub:

Globally disable GNOME's Trash in Debian-based distributions

I hope this is of (some) help to those who hate the Trash with the same passion as I do ...

| improve this answer | |

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.