10

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.

3
  • Everytime time you "delete" something is sent to a Trash folder, empty the trash each time before removing your device. Dec 14, 2012 at 19:43
  • 2
    I am interested in a solution which turns off recycle bins for removeable media at all... Mar 23, 2013 at 9:19
  • 1
    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. Jan 9, 2014 at 16:42

2 Answers 2

9

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.

3
  • 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, 2016 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, 2016 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, 2016 at 16:55
3

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 ...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .