Disable trash for all external/removable drives? (e.g. SD cards, USB flash drives, etc; basically how Windows behaves)

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
NM64
Level 4
Level 4
Posts: 245
Joined: Sat Feb 04, 2017 11:34 pm

Disable trash for all external/removable drives? (e.g. SD cards, USB flash drives, etc; basically how Windows behaves)

Post by NM64 »

I just want to know if there's a way to universally disable the trash for external/removable drives such as USB flash drives, SD cards, etc. The tl;dr is that I just want to be able to replicate how Windows handles its recycle bin where it's only used for fixed disks, not external/removable drives.

I know you can manually create a .Trash-1000 file and .Trash-999 file (the latter only useful on live ISOs) on the root of a given partition but this needs to be done on every single drive/partition where you want to disable trash which is very sub-optimal for the eldery non-tech-savvy family relatives that I have running Mint (especially if they buy a new USB drive or the like). I do have one uncle that has trash disabled universally for the entire PC but, in general, we want to keep the trash enabled on the local hard drive.

This would ideally be on Cinnamon but knowing if it's possible on XFCE would be nice too (but not as important).

EDIT:
NM64 wrote: Wed May 18, 2022 4:04 pm Oh uh, I forgot to say that normally the config we use also replicates Windows in that we have the "delete" context menu hidden (except for that one uncle).

Basically we rely heavily on the way trash works in that files can still be easily restored but, on removable drives, it's a problem as the trash never gets emptied before the drives get removed and therefore the disk space never gets recovered.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 5 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
CPU: Xeon E3-1246 v3 (4c/8t Haswell/Intel 4th gen) — core & cache @ 3.9GHz via multicore enhancement
GPU: Intel integrated HD Graphics P4600
RAM: 4x8GB Corsair Vengence @ DDR3-1600
OS: Linux Mint 20.3 Xfce + [VM] Win7 SP1 x64 
djph
Level 7
Level 7
Posts: 1938
Joined: Thu Jun 27, 2019 5:43 am
Location: ::1

Re: Disable trash for all external/removable drives? (e.g. SD cards, USB flash drives, etc)

Post by djph »

If you use "Delete" it should, well, delete things as opposed to moving them to trash.
User avatar
NM64
Level 4
Level 4
Posts: 245
Joined: Sat Feb 04, 2017 11:34 pm

Re: Disable trash for all external/removable drives? (e.g. SD cards, USB flash drives, etc)

Post by NM64 »

djph wrote: Wed May 18, 2022 3:59 pm If you use "Delete" it should, well, delete things as opposed to moving them to trash.
Oh uh, I forgot to say that normally the config we use also replicates Windows in that we have the "delete" context menu hidden (except for that one uncle).

Basically we rely heavily on the way trash works in that files can still be easily restored but, on removable drives, it's a problem as the trash never gets emptied before the drives get removed and therefore the disk space never gets recovered.
CPU: Xeon E3-1246 v3 (4c/8t Haswell/Intel 4th gen) — core & cache @ 3.9GHz via multicore enhancement
GPU: Intel integrated HD Graphics P4600
RAM: 4x8GB Corsair Vengence @ DDR3-1600
OS: Linux Mint 20.3 Xfce + [VM] Win7 SP1 x64 
djph
Level 7
Level 7
Posts: 1938
Joined: Thu Jun 27, 2019 5:43 am
Location: ::1

Re: Disable trash for all external/removable drives? (e.g. SD cards, USB flash drives, etc)

Post by djph »

Can't have your cake and eat it too.
User avatar
NM64
Level 4
Level 4
Posts: 245
Joined: Sat Feb 04, 2017 11:34 pm

Re: Disable trash for all external/removable drives? (e.g. SD cards, USB flash drives, etc)

Post by NM64 »

djph wrote: Wed May 18, 2022 4:15 pm Can't have your cake and eat it too.
I didn't think this was possible but I wanted to at least make sure.
CPU: Xeon E3-1246 v3 (4c/8t Haswell/Intel 4th gen) — core & cache @ 3.9GHz via multicore enhancement
GPU: Intel integrated HD Graphics P4600
RAM: 4x8GB Corsair Vengence @ DDR3-1600
OS: Linux Mint 20.3 Xfce + [VM] Win7 SP1 x64 
djph
Level 7
Level 7
Posts: 1938
Joined: Thu Jun 27, 2019 5:43 am
Location: ::1

Re: Disable trash for all external/removable drives? (e.g. SD cards, USB flash drives, etc)

Post by djph »

NM64 wrote: Wed May 18, 2022 4:17 pm
djph wrote: Wed May 18, 2022 4:15 pm Can't have your cake and eat it too.
I didn't think this was possible but I wanted to at least make sure.
Yup, never hurts to ask - maybe someone else will come by and point out an easier way about it; even if it means scripting the keys / having to make them for family
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Disable trash for all external/removable drives? (e.g. SD cards, USB flash drives, etc)

Post by pbear »

NM64 wrote: Wed May 18, 2022 4:04 pm ... the disk space never gets recovered.
That's not quite true. If someone runs out of space, you can always suggest they empty the trash.

By the way, how does one disable Trash universally? Don't think I know that one.
User avatar
NM64
Level 4
Level 4
Posts: 245
Joined: Sat Feb 04, 2017 11:34 pm

Re: Disable trash for all external/removable drives? (e.g. SD cards, USB flash drives, etc)

Post by NM64 »

pbear wrote: Thu May 19, 2022 1:00 amBy the way, how does one disable Trash universally? Don't think I know that one.
I should have clarified that I meant disabling the trash command universally, not disabling the actual trash (and even then I only mean the GUI command; if there's a terminal command then it's certainly not going to be disabled).

From what I can recall on Cinnamon (I personally use XFCE), there's an option in Nemo for something like "always delete immediately and skip the trash"

But because it's a Nemo setting, this does technically mean that the trash would still exist if you were to navigate to its location and/or you used some method outside of Nemo to delete files (e.g. manually installing Caja or Thunar on Cinnamon and then deleting files through them rather than Nemo).
CPU: Xeon E3-1246 v3 (4c/8t Haswell/Intel 4th gen) — core & cache @ 3.9GHz via multicore enhancement
GPU: Intel integrated HD Graphics P4600
RAM: 4x8GB Corsair Vengence @ DDR3-1600
OS: Linux Mint 20.3 Xfce + [VM] Win7 SP1 x64 
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Disable trash for all external/removable drives? (e.g. SD cards, USB flash drives, etc; basically how Windows behave

Post by pbear »

Thanks. If anyone is interested, it's Edit > Preferences > Behavior > Bypass the Trash when the Delete key is pressed.

One is then required to confirm the Delete (AFAIK, there's no way to bypass Trash in any of the desktops with confirming), but can't accidentally send something to Trash and avoids having to right-click to Delete without sending to Trash. But, if wish to send a particular file to Trash, that option remains on the right-click menu.
User avatar
NM64
Level 4
Level 4
Posts: 245
Joined: Sat Feb 04, 2017 11:34 pm

Re: Disable trash for all external/removable drives? (e.g. SD cards, USB flash drives, etc; basically how Windows behave

Post by NM64 »

pbear wrote: Thu May 19, 2022 1:44 am Thanks. If anyone is interested, it's Edit > Preferences > Behavior > Bypass the Trash when the Delete key is pressed.

One is then required to confirm the Delete (AFAIK, there's no way to bypass Trash in any of the desktops with confirming), but can't accidentally send something to Trash and avoids having to right-click to Delete without sending to Trash. But, if wish to send a particular file to Trash, that option remains on the right-click menu.
Hmm, I could have sworn there was a way to straight-up remove the Trash option from even the right-click menu... Maybe that required lower-level editing, or maybe I'm just straight-up not remembering (this was either late 2016 or early 2017 with Mint 18.1) and perhaps we did in fact also do the manually-created .Trash-1000 file method on the internal hard drive's partition? (which would then obviously result in Mint saying it can't be moved to the trash and asks if you want to immediately delete the file)
CPU: Xeon E3-1246 v3 (4c/8t Haswell/Intel 4th gen) — core & cache @ 3.9GHz via multicore enhancement
GPU: Intel integrated HD Graphics P4600
RAM: 4x8GB Corsair Vengence @ DDR3-1600
OS: Linux Mint 20.3 Xfce + [VM] Win7 SP1 x64 
Locked

Return to “Beginner Questions”