How to Securely Delete Files on a Mac in 2026

·
7 min read

Switching to Mac is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

Deleting a sensitive file and emptying the Trash can feel final. On an unencrypted drive, however, recovery software may still find its data until the storage reuses those blocks.

Modern Macs need a different approach from traditional file shredding. If your Mac uses an SSD and APFS, turn on FileVault, delete files normally, and erase the encrypted volume when you need everything unrecoverable. Overwrite commands remain useful for spinning hard drives, but they can’t guarantee the same result on an SSD.

Finder window with a file selected and the Delete key visible on an Apple keyboard inset

Check Whether Your Mac Uses an SSD

Nearly every current Mac uses solid-state storage. Before choosing a deletion method, check your storage hardware:

  1. Hold Option and open the Apple menu.
  2. Select System Information.
  3. Expand Hardware, then select Storage or NVMExpress.
  4. Check the drive type and protocol.

An entry under NVMExpress indicates SSD storage. Older Macs and many external drives may use a rotational hard drive.

This distinction matters. Hard drives normally write data to predictable physical locations, so an overwrite command can replace a file’s contents. SSD controllers move data between cells through wear-leveling and block remapping, which prevents macOS from reliably overwriting every previous copy.

Securely Delete Files From an SSD or APFS Volume

For an SSD, encryption provides the dependable protection. FileVault encrypts data stored on your startup disk, including residual blocks left after deleting files.

Turn On FileVault

  1. Open System Settings.
  2. Go to Privacy & Security > FileVault.
  3. Click Turn On FileVault.
  4. Choose a recovery method and store the recovery key somewhere safe.
  5. Allow encryption to finish before relying on it for sensitive files.
System Settings > Privacy & Security > FileVault with the Turn On FileVault button and recovery options visible

FileVault protects data at rest if someone removes the drive or accesses the Mac without your credentials. It won’t protect files from someone who can sign in to your account, so a strong login password still matters.

Turning on FileVault after deleting a file doesn’t guarantee that every previous unencrypted copy has disappeared. For sensitive work, enable encryption before creating or downloading the files.

Delete the File and Empty the Trash

Once FileVault is active and encryption has finished:

  1. Select the file in Finder.
  2. Press Cmd + Delete, or Control-click it and choose Move to Trash.
  3. Control-click the Trash icon in the Dock.
  4. Select Empty Trash, then confirm.
Finder window with a sensitive file selected and the Control-click menu open with Move to Trash highlighted
Finder confirmation dialog for permanently erasing items from the Trash with Cancel and Empty Trash buttons visible

macOS removes the file’s directory reference and marks its blocks as available. TRIM then tells the SSD that those blocks can be reclaimed, though you can’t control when the drive performs that work.

Residual data remains encrypted. For routine deletion on a FileVault-protected Mac, this is a solid choice and works as expected without adding unnecessary wear to the SSD.

Use rm -P on a Spinning Hard Drive

The rm -P command overwrites a file three times before removing it. Use it only for files stored on a rotational hard drive, where overwriting has a meaningful relationship to the physical data.

Avoid this command on SSDs. Wear-leveling may direct each pass to different flash cells, leaving earlier data elsewhere on the drive.

rm also bypasses the Trash. There is no Undo command.

  1. Press Cmd + Space, type Terminal, and press Return.
macOS Spotlight Search showing Terminal as the selected result
  1. Type rm -P, followed by a space.
  2. Drag the target file from Finder into the Terminal window. This inserts its complete path and safely handles spaces in the filename.
  3. Check the path carefully.
  4. Press Return.
rm -P /path/to/file
Terminal window showing rm -P followed by a dragged-in file path, with the command ready to run but not yet executed

If Terminal reports a permissions error, confirm that your account can modify the file. Don’t add sudo unless you understand exactly which path the command targets. A typo made with administrator privileges can delete far more than you intended.

Erase Free Space on an HDD

After ordinary deletion, diskutil secureErase freespace can overwrite unused space on a hard drive. This covers blocks belonging to files deleted earlier.

diskutil secureErase freespace 2 /Volumes/DriveName

Replace DriveName with the exact volume name. The level controls the overwrite pattern and pass count; higher levels take longer and rarely provide a practical benefit over a basic overwrite on a working modern hard drive.

I’d skip this command for SSDs, encrypted APFS volumes, and drives whose contents you haven’t backed up. It adds SSD wear, doesn’t overcome flash-controller remapping, and provides no useful benefit when FileVault already protects the residual data.

Should You Use a File-Shredder App?

Apps such as Permanent Eraser offer a graphical interface for overwriting files or erasing Trash contents. That can be convenient when you’re working with an external hard drive and don’t want to use Terminal.

The storage limitation remains. A shredder app can’t force an SSD controller to overwrite every physical copy, regardless of how many passes the app advertises. Claims of guaranteed unrecoverable deletion on SSDs deserve skepticism.

A typical shredder workflow looks like this:

  1. Move the files to the Trash.
  2. Open the shredder app.
  3. Review every item queued for deletion.
  4. Confirm the overwrite operation.
Finder Trash window containing files queued for a file-shredder app, with the item names and storage location visible
Permanent Eraser confirmation dialog listing the Trash contents and warning that erased files cannot be recovered

Use this workflow for rotational hard drives. On an SSD, FileVault and encrypted-volume erasure provide better protection.

Avoid Building a Finder Shredder With Automator

Automator can pass selected Finder items to a deletion app, but the extra shortcut doesn’t improve the underlying erasure method. It also makes an irreversible action easier to trigger by accident. That’s poor design for sensitive files.

If you maintain an existing Automator deletion tool for an external HDD, inspect each action before using it. Current Automator installations can still create applications, though action names and availability may vary with the installed shredder app.

macOS Spotlight Search showing Automator as the selected result
Automator document chooser with Application selected and the Choose button highlighted
Automator workflow editor with the action for receiving selected Finder items visible in the actions library
Automator workflow containing a third-party erase-selected-items action, with its irreversible deletion warning visible
Automator Save dialog for an application workflow with the filename and destination fields visible

For an HDD you use regularly, Terminal gives you clearer control over the exact target. For an SSD, the Automator workflow provides a reassuring button without a reliable physical overwrite.

Securely Erase an Entire Mac or External Drive

Erase the complete encrypted volume when you’re selling a Mac, disposing of a drive, or handling data that needs stronger protection than routine deletion. Back up anything you plan to keep first.

Erase a Mac’s Internal Drive

  1. Confirm that FileVault has finished encrypting the startup disk.
  2. Sign out of iCloud and other services tied to the Mac.
  3. Shut down the Mac and start macOS Recovery.
  4. Open Disk Utility.
  5. Choose View > Show All Devices.
  6. Select the internal storage device or the appropriate volume group.
  7. Click Erase and follow the prompts.
  8. Quit Disk Utility and reinstall macOS if another person will use the Mac.
macOS Recovery > Disk Utility with View > Show All Devices enabled, the internal storage device selected, and the Erase button highlighted

Erasing a FileVault-protected volume discards the encryption keys associated with its previous contents. That makes the remaining encrypted data practically inaccessible without those keys.

Erase an External Drive

  1. Open Disk Utility from Applications > Utilities.
  2. Choose View > Show All Devices.
  3. Select the physical external drive in the sidebar.
  4. Click Erase.
  5. Choose APFS (Encrypted) for a drive used with current Macs.
  6. Enter a strong encryption password and complete the erase.

Use Mac OS Extended (Journaled, Encrypted) only when the drive must work with older Macs that don’t support APFS.

Disk Utility may show Security Options for a rotational drive. Choose an overwrite level there if the option appears. SSDs generally don’t expose this control because multi-pass overwriting can’t provide the promised result.

Where Is Secure Empty Trash?

Modern macOS doesn’t include Secure Empty Trash. Apple removed the command because SSD behavior prevents the operating system from guaranteeing that every copy was overwritten.

The regular Empty Trash command is appropriate for routine deletion on a FileVault-encrypted Mac. If FileVault is off, deleted data may remain recoverable until the drive reuses its blocks.

Can Recovery Software Restore Deleted Files?

Recovery software has a reasonable chance with recently deleted files on an unencrypted hard drive, especially when you stop using the drive immediately. Continued use may overwrite the relevant blocks.

Recovery from an encrypted volume becomes far less practical without the FileVault credentials. After the encrypted volume is erased and its keys are discarded, previous contents should be inaccessible.

The Method I Recommend

Keep FileVault enabled before storing sensitive files. Delete those files normally, empty the Trash, and erase the complete encrypted volume before selling or retiring the Mac.

Use rm -P or free-space overwriting only for rotational hard drives. Those methods remain useful in that narrow case, but bringing them to an SSD adds confidence without adding dependable protection. Encryption is the good option for modern Macs, provided you protect the recovery key and erase the volume when the stakes require it.