0

On Windows systems, the Trash-folder for deleted files can be turned off in the system settings, making a simple Delete keypress remove the selected file(s) permanently.

I know that it's possible to directly delete files on both Ubuntu and Windows with Shift + Delete, however besides being confusing when coming from the aforementioned Windows config, this is not possible to use if there is any second-layer keymapping on the Delete-key.

Is there a way to have a single Delete keypress permanently remove files in the Caja file manager?

2 Answers2

0

Show Action to Permanently Delete Files and Folders

At the top of the page, when Files/Nautilus is open, select Files, then select Preferences, then select Behavior, then select Show action to permanently delete files and folders.

enter image description here

C.S.Cameron
  • 19,519
  • It doesn't actually provide what OP asked for. It just adds one extra context menu (right-click menu) item to delete without using the trash, it does not let the user remove a file bypassing the trash by pressing the key. But nevertheless it may be useful workaround. – pomsky May 30 '20 at 15:18
  • @Pomsky: Seems almost as fast to left click the file and click Delete Permanently as left clicking and hit Delete. It is the best I know. – C.S.Cameron May 30 '20 at 15:36
  • The question is specifically on hitting the Delete key and have it bypass the trash, so indeed, your answer is useful as a workaround, yet does not answer the question. The answer is, a.f.a.i.k., that it used to be possible in the old days, but not anymore in current versions of nautilus. – vanadium May 30 '20 at 15:54
0

So, I've looked through the other solutions and found this workaround: How to turn off trash?

It suggests to remove everything in ~/.local/share/Trash/ and then make the directory immutable by setting it to sudo chattr +i ~/.local/share/Trash/ in the command line. In my case, I had to create the Trash directory first, because I had never moved anything there.

In MATE/Caja, I get an error message that the Trash directory could not be modified when I try to normally delete something. Then I can hit Enter on the dialog box to delete the file permanently. This practically works like the Windows option, so it is a functional solution for me.

I tried this on Thunar as well, but it didn't give me an option to permanently delete the file, it just shows an error message.

I don't use Thunar a lot so this is not relevant for me, but ymmv depending on the file manager. I've changed the question accordingly.