How to create a Secure Delete tool on Mac

Not to mention, data theft is increasing day by day. It’s more important than ever to make sure all confidential data, including medical and financial information are securely deleted from the storage drive, before throw it away. Deleting files from trash doesn’t mean you successfully managed to wipe every trace of all those files from your system. When you empty trash, OS X simply removes the information that points to the location of those files and set the space occupied by files as free for many other uses. The removed file remains on the hard drive and it can be retrieved by efficient data recovery software until it is overwritten with some other data.

To enhance security, Apple introduced Secure Empty trash feature, which is available since Mac OS X 10.3. Using this feature, users can prevent the recovery of deleted data by overwriting it with some random data, and makes it impossible for any of the data recovery programs such as iCare data recovery, easeus data recovery, stellar phoenix data recovery, and so forth. Though, in Mac OS X, yet there isn’t any option available to securely delete files individually. Luckily, using Automator, a personal automation assistant, which lets you create a secure delete service on the context menu that shows up whenever you right-click on a file or folder.

Steps to create Secure Delete tool using Automator on Mac

Following are the steps to create a Secure delete service using Automator, which safely erase data using srm and make sure even best file recovery program can’t restore files back. Here’s how to set it up:

Step 1: Navigate to Applications and double click the Automator robot icon. When it starts, choose the big service icon from the dialog box. In case, the dialog doesn’t shows up, click New from the file menu.

Create-secure-delete-service-using-automator

Step 2: In the new Automator workflow window, at the top right, you’ll see two drop-down lists alongside the heading Service Receives. Change the first one to Files or Folders and second one on the right to Finder.

Create-secure-delete-tool

Step 3: Click in the search field above the Action library column on the left, containing a list of all of the Automator actions, and type ‘Run Shell Script’. This will filter the action, which you should drag to the right side of the window, and drop it over the workflow area.

create-work-flow-for-secure-delete-service

Step 4: Once you’ve added Run Shell Script on the workflow area, make sure the shell variable is set to /bin/bash, and change the Pass Input drop-drown to As Arguments.

secure delete files from mac

Step 5: Now in the script area, delete what’s already there, and use the following script:

Step 6: Now Click file->Save. Since this is a service, you don’t have to point a destination for the file. Though, you will have to save the file with a name, which you would like to appear in the context menu when you right-click on any file or folder. Lets give it a name Secure delete.

Save-secure-delete-tool

Once the service has been saved, you can quit the Automator and test your new service. Rightclick on files or folders you want to permanently delete, and select Secure Delete from the contextual menu that will appear at the bottom. When you click on it, the service just created will call the srm command and begin a secure delete procedure. Files deleted this way are permanently wiped out of your Mac, and obviously, you can’t recover lost data once you used this service. Keep in mind, you won’t get any status update when you use this service, and also larger files might take a while to be deleted. So, once the secure erase process started, you can move on with other things.

In case, you no longer need Secure delete service on your Mac, then open a Finder window and press Shift+Command+G. In the ‘Go to the folder’ dialog box appears, type ~/Library/Services and press the Go button. Then throw the service file into the trash. That’s it!

Post Comment