How to Empty the Trash Securely in OS X El Capitan

While Apple has added a number of new features including the split view mode in El Capitan, it has removed some old features as well. One of these features that was removed is secure empty trash that allowed users to make sure their trash files could never be recovered. The feature was removed due to it being unstable, as it did not work properly with some specific hardware.

While the feature is gone from El Capitan, there is still a way for you to perform the equivalent of that feature. You can still securely empty the Trash on your Mac but will do it with a Terminal command.

Note: The method below deletes the chosen files and/or directories permanently. The actions are irreversible, and you will never have access to the deleted files again no matter what method you use, so please be cautious while doing the task.

In order to accomplish the task, all you need is a command and access to the Terminal app.

1. Click on Launchpad in your dock, search for and click on Terminal, and it will launch for you.


2. Here you need to specify what you are going to delete. First, you will learn how you can delete an individual file, and then how you can delete an entire directory.

To delete a file you are going to use the following command and the directory path at the end of the command. In the example below, we delete the file named “Image-1.png” that is located in the “Unwanted Files” folder on the desktop. Press Enter after you have entered the command.

srm -v /Users/Mahesh/Desktop/Unwanted\ Files/Image-1.png


3. As soon as you press Enter, the selected file will be gone forever. Terminal should let you know by saying “done” in its window which means the file was successfully deleted.


4. Now that you learned how to delete an individual file permanently, here’s how you can delete an entire directory.

To delete a directory, you will use another flag with the srm command.

To do that type the following command into the Terminal window and press Enter. To fill-in the directory path, drag and drop the directory onto the Terminal window, and the path will automatically be filled.

srm -rv /Users/Mahesh/Desktop/Unwanted\ Files


5. Again, you will get the same “done” message that confirms the selected directory was successfully deleted.


The files that you delete using the above command will be gone forever, and you will never be able to recover them unless, of course, you have backed them up somewhere.

For those who are looking for an easier way to securely delete files, try the tutorial here to add a Delete option in the context menu.

If you are concerned about the security of the files that you have deleted, the above guide should help you get peace of mind by assuring you that your deleted files will never be recovered by anyone.

Leave a Reply

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.