‘Delete’ Permanently in Context Menu in Ubuntu / Elementary OS Luna

Last updated: May 7, 2014

Want to delete files or folders from your file browser bypassing trash? Well, this tutorial will show you how to add ‘Delete’ (Permanently) option to your context menu in Ubuntu Nautilus or Elementary OS Pantheon.

 

For Ubuntu Nautilus File Browser:

1. Open your file browser.

2. Go to menu: Edit -> Preferences

3. Under behavior tab, check the box where it says “Include a Delete command that bypasses Trash”

Ubuntu Delete files bypassing Trash

Once done, you’ll find an option “Delete” in context menu:

For Elementary OS Luna:

Thanks to Trisailing, he left a comment in another post with below steps:

1. Press Ctrl+Alt+T on keyboard to open the terminal. When it opens, run command to create and edit the config file:

sudo scratch-text-editor /usr/share/contractor/Delete.contract

2. Copy and paste below lines into empty file:

[Contractor Entry]
Name=Delete permanetly
Icon=pantheon-files
Description=Delete files, skip trash
MimeType=application;audio;chemical;image;message;model;multipart;text;video;x-conference;x-epoc;x-world
Exec=rm -r
Gettext-Domain=pantheon-files

Add inode to the value list of MimeType will allow to delete folders. But (Thanks to @Trisailing) if you click Delete permanently on a blank space it will delete all files and folders in the current directory. Use it at your own risk!

3. Save the file. Log out and back in.

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

5 responses to ‘Delete’ Permanently in Context Menu in Ubuntu / Elementary OS Luna

  1. Kaloyan Grancharov May 4, 2014 at 1:49 pm

    In order to avoid the Trash when deleting a selected file, I always press Shift+Del
    :-)

  2. One further thing. If you click Delete permanently on a blank space it will delete all files and folders in the current directory. To stop this behavior, remove inode from list, though doing so will stop you from deleting folders. The shft+del works well though.

  3. Your instructions are great if they were complete. But as I keep saying in each of these forums-don’t assume anything. Your last instruction means nothing to me. Save the file. Where? What name do I give the file? etc., etc, etc. As it stands I cannot complete the process because the information accross is missing. Gentlemen, I am knew to Linux, and I am trying to learn more, but If we are going to defeat Windows, then you need to make it as easy as possible for the newbies that are coming in. People give up, because many things in Linux appear harder than in Windows. Please, please, please write all your instructions so that a 7 year old or an 80 yearold that knows nothing about computers can do it. As long as you write it so that someone who already has some knowledge can understand, you make Linux more frustrating than windows. I am almost 60, but most people my age would have given up and gone back to windows. Thank you.

    • Sorry @od13. For Elementary OS section, I’ve mentioned in step 1 that it will create the config file and open it with editor, also the code has give the file its name.