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