Summary: In this article, we'll share a couple of methods to erase deleted files on Mac securely. The methods we'll cover are as follows:
- Erase Mac Hard Drive by Using Disk Utility
- Erase Mac Hard Drive by Using Terminal
- Erase Deleted Files by Using File Erasure software
Download the 30-day free Stellar File Eraser software to erase deleted files on Mac.
When you delete your files on Mac by using the Option + Command + Delete keys or by removing temporarily deleted files directly from Trash or by emptying Trash, you might have the impression that the files are removed permanently from your Mac. And, you can't get your deleted files back unless you have a Time Machine backup. That's true if your Mac has SSD with TRIM command enabled, which removes the deleted files during garbage collection.
But when your Mac has a hard drive, hybrid drive, or SSD with TRIM command disabled, the data deletion mechanism is rather different. In such a case, macOS doesn't remove the deleted files by overwriting the storage space with 0s, 1s, or random bits. Instead, it marks the files as deleted in the storage drive's file system to speed up the deletion process. So, the deleted files remain in an isolated state in the storage disk, ready to be overwritten by other files during the disk write operation. This operation occurs when you save any file on the storage drive.
Any malicious user who gains unauthorized access to your Mac or Mac storage drive can use a professional Mac data recovery software to scan the drive based on file signatures and retrieve the marooned files. As a result, your data gets compromised. And, you may suffer from financial loss, identity theft, reputation loss, or business loss. So the question arises, how to erase deleted files on Mac so that they can't be recovered by any data recovery software.
The next section describes a native method to wipe hard drive to remove all files at once and a third-party software method to erase any particular files securely.
Erase Mac Hard Drive by Using Disk Utility
When you are selling, donating, or dumping your old Mac hard drive, back up the drive's data then wipe your drive by using Disk Utility's secure erase feature. Steps are as follows:
1. Open Disk Utility,
a. For non-startup disk or volume, go to Finder > Applications > Utilities > Disk Utility.
b. For startup disk, start or restart your Mac, then press-hold Command + R keys. Release them when the Apple logo appears. Your Mac boots into macOS Recovery mode. From the macOS Utilities window, select Disk Utility, then click Continue.
2. At command prompt, type diskutil secureErase freespace then hit Return. Here replace with the drive identifier and with one of the following number:
3. On the popup window, specify Name, Scheme, and Format.
4. Click Security Options, then drag the slider to choose the number of passes to overwrite the erased data. Click OK. Click Erase, then click Done.
5. Let Disk Utility erase the hard drive by using security options.
Erase Mac Hard Drive by Using Terminal
Back up your hard drive's data before working with Terminal. Use the command version of Disk Utility (diskutil) in Terminal to secure erase Mac hard drive. Steps are as follows:
1. Open Terminal. Either use the Utilities folder or macOS Recovery mode as per relevance.
2. At command prompt, type diskutil secureErase freespace then hit Return. Here replace with the drive identifier and with one of the following number:
a. 0 - Single-pass zero-fill erase
b. 1 - Single-pass random-fill erase
c. 2 - US DoD 7-pass secure erase
d. 3 - Gutmann algorithm 35-pass secure erase
e. 4 - US DoE algorithm 3-pass secure erase
3. Let the Terminal app erase the drive securely. Once the erase operation is over, Quit Terminal.
Erase Deleted Files by Using a Secure File Erasure Software
The secure erase operation of Disk Utility or its command-line version diskutil is not useful in case you wish to repurpose your drive or wanted to erase only critical files to prevent their misuse. In such a case, you will need a file erasure software. Stellar File Eraser for Mac is one such trustworthy tool that can erase deleted files on Mac permanently with the click of a button. Steps are as follows:
1. Download and install the 30-day free Stellar File Eraser tool on your Mac.
2. Launch the tool and from the 'Select What To Erase' screen, toggle on Unused Space, then click Next.
3. Select the volume to erase unused space, then click Erase.
4. On the Confirm Erasure dialog box appears, click Confirm Erase.
5. Let the secure data erasure software complete the erasure process.
The software erases Unused Spaces (which includes all deleted files and free space) for good on your MacBook Air, iMac, Mac mini, or their Pro models, as well as an external hard drive. The tool safeguards your privacy and protects against data theft.
Conclusion
Now you're aware that the files you delete from your Mac are not removed permanently and can be easily recovered by using a Mac data recovery software. This leaves your Mac or Mac storage drive vulnerable to data leak and misuse. The native Disk Utility's secure erase method or its command-line version to wipe the complete volume or disk is useful but has some limitations.
So, when you need to erase your deleted files permanently, use Stellar File Eraser for Mac. The tool comes with a 30-day free offer that allows you to erase your deleted Mac files without paying any buck. Plus, you'll know the interface, usage, and features. The software is fully compatible with macOS Catalina 10.15 and earlier versions.