Permanent Delete on OSX (Windows Shift + Delete Alternative)

Create an Automator service or application to facilitate executing the rm shell command, which will permanently delete files or folders and skip the trash.

For example, start with creating a new Service in

  • Select files or folders as input, you probably also want to limit the availability of this service to the Finder app.

Automator service input

  • Optionally, but highly recommended, first add an Ask for Confirmation step to the workflow.

Confirmation step

  • Finally, add the Run Shell Script step to the workflow. Make sure to pass input as arguments. Then you can put in the following script:
for f in "[email protected]"
    rm -rf "$f"

Input shell script

You can also add a -P parameter to rm for additional security while deleting. For an extra nicety, you can add some audible feedback by adding the following command at the end of the shell script:

afplay "/System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/finder/empty trash.aif"

Save your service, and it should be ready to use in Finder from the Services menu in the menu bar. You can also configure a keyboard shortcut to your service in the Keyboard preference pane of System Preferences.

Services menu

Service in action

Instead of creating a service, you could similarly create an application in Automator, which you can pin in the Dock so you can drag files to it.