How to Delete Data Securely on Mac?

Sameeksha Medewar
TechGeekBuzz
Published in
5 min readNov 30, 2022
Delete Data Securely on Mac

What do you think when you move any file on your Mac system to trash? Does it get completely deleted? The answer is no.

When you move a specific file to trash, the computer system does not delete it permanently. Instead, it just makes the file invisible or deletes the access point of that file. It frees up the space that the deleted file consumed and allows other files in the future to overwrite that space. Until any new file overwrites that space, the deleted file is still present on your disk.

Deleting data securely implies deleting files forever without leaving no traces behind and not being recovered by you and other third-party applications. And emptying trash does not definitely delete your data securely.

To help you with deleting your files securely on Mac, we have come up with three different methods in this article.

So, let us explore!

Solution 1: Deleting Files Securely Using the rm Command

The ‘rm’ command in Mac instructs the terminal to delete the folder, along with all files and sub-folders in it.

Here are simple instructions to follow to delete data securely on Mac using the rm command:

  1. On your desktop, click the Apple menu, and select ‘System Preferences.’

2. Next, select the ‘Keyboard’ option.

3. On the top of the dialog window, select ‘Shortcuts’. On the left side, choose ‘Services’.

4. Now, under the Services category, look for ‘New Terminal at Folder’ and ‘New Terminal Tab at Folder’. If they are unchecked, check them.

5. Now, go to Finder and search for the folder that stores the files you want to delete securely. Right-click on the folder and select ‘New Terminal at Folder’.

A new terminal opens up.

6. Now, type the command rm with the option ‘-P’ and the file name with its extension. Here, in this example, the file name is MacBook1, and the extension is txt.

Solution 2: Securely Delete Files in the Trash

You can also delete files securely after you move them to the trash. Follow the below steps:

  1. Move the files you want to delete to Trash (present at the end of the MacBook’s dock).
  2. Go to Finder and select ‘Secure Empty Trash’.

This will take time, depending upon the size of your files in Trash.

However, it is important to note that this process works only with OS X 10.10 Yosemite and earlier versions.

Solution 3: Delete Multiple Files Using an Encrypted Disk Image

A disk image is a file that stores the content and the structure of an entire disk. You can use it to securely delete multiple files on Mac. To do so, first, you need to create an encrypted .dmg file and move here all the files you want to delete.

Here’s how you can do it step-by-step.

  1. Go to Applications, and select Utilities.

2. Open ‘Disk Utiliies’.

3. Next, select File → New Image → Blank Image.

4. Now, enter the disk name as per your choice and provide the ‘.dmg’ extension. Here, I have given the disk name Sample.dmg.

5. The next step is to choose the size and format of the disk.

6. Later, choose the encryption method. The most recommended encryption method is 128-bit AES encryption.

7. To encrypt your disk image, provide the password and hit Choose.

8. Finally, hit Save.

A disk image of the name Sample gets created.

9. Now, you can add files to this disk image that you want to delete securely. After that, right-click on the disk image and choose the Eject option.

10. Finally, move this disk image to Trash, and you are done.

Though your files are in Trash, no one can access them without the encryption key or password. Also, you can empty Trash to let go of your files forever.

Securely Delete Data on Mac

Using these ways, you can delete data securely on Mac. However, make sure to back up your data, whether you want to delete it securely or not. The first two methods will delete your files permanently. However, the third method helps you encrypt your hard drive; no one can access files without a password.

People are also reading:

  1. Best Tech Stacks that you Can Choose for your Career
  2. Bootable Installer for macOS
  3. Reasons to Learn Programming
  4. Tech Startup Ideas that Can make you Billionaire
  5. Best Coding Tips

--

--

Sameeksha Medewar
TechGeekBuzz

A computer science graduate with interest in creating technical content to share knowledge.