I don't believe in Trash Bin and when I delete something I want it to be gone forever, how to turn off the Trash?
P.S. When I delete files from the console do they also go to Trash?
I don't believe in Trash Bin and when I delete something I want it to be gone forever, how to turn off the Trash?
P.S. When I delete files from the console do they also go to Trash?
You can use Shift+Delete instead of Delete to delete file(s) forever, but don't forget; If you delete the file forever, you can't easily get it back.
You can add a delete action as described at How to delete files bypassing trash . Files deleted from the console are immediately removed, but please note that under some circumstances they can still be recovered, if you want to securely delete files use the "wipe" command.
Hmmm.
Yes, console deletes have no "recycle" action - they are gone.
On my mp3 player I added a file called
.Trash-1000
(not a directory), which just gets in the way.I hit
Delete
and get prompted: Cannot move file to rubbish, do you want to delete immeditately? with the default actionDelete
.Good enough for my needs.
You can set the immutable bit.
To do so, first empty the trash:
And then:
After that, when you delete or move something to the trash, you'll get the following message:
EDIT: Actual results below
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.
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 libgio (» GIO) 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 ...
The answer by SirCrow with the immutable bit might be better, but here's another alternative solution. In my case, I solved it with:
This will change ownership of the location where the trashed files are typically stored to root, making the normal, non-root user unable to use the trash. Of course, this assumes the current desktop user is not running as root, but typically that's not the case since it isn't recommended anyway.
When the Trash directory is owned by root in this way, you'll see the message:
As was answered before, anything deleted from Terminal/Console is gone for good -- No trash.
Tested in Ubuntu 20.04 LTS.
For the external drives, remove any
/.Trash-$UID
directories.For the current drive, as for the workaround, you can set Bin to automatically empty (e.g. every hour). To do that, go to Activities and type File History & Trash (part of Settings). From there you can adjust the Rubbish Bin settings. You can also find the steps how to get into Rubbish settings in Ubuntu's Help.