NythyCleaner
← Blog

How to Securely Delete Files on Mac

9 min read
#privacy#macos#security#secure-delete#encryption

How to Securely Delete Files on Mac

Moving a file to the Trash and emptying it only removes the directory entry that pointed at the data. Until those disk blocks are reused, forensic tools can sometimes recover fragments — especially on traditional hard drives where the same physical sectors stayed mapped for a long time.

Secure deletion (sometimes called shredding) tries to overwrite file contents with meaningless patterns before the file is deleted, so recovery software sees zeros, ones, or random bytes instead of the original document.

On modern Macs the picture is more nuanced: APFS and SSDs change what “overwrite” really guarantees. Still, multi-pass wiping remains a useful defense in depth for confidential exports, legal holds, or personal files you want gone beyond a casual Trash empty.

This guide explains the limits of macOS storage, what “DoD” passes mean, and how NythyCleaner’s Secure Delete implements overwriting in the Privacy section.

Trash vs secure delete

ActionWhat happens
Move to TrashFile stays on disk; only hidden from normal browsing.
Empty TrashFilesystem frees clusters; data may linger until overwritten.
Secure deleteData is written over (one or more passes), then the file is removed.

Secure delete is slower and wears SSDs slightly more, but it is the right tool when content matters more than speed.

Why APFS and SSDs change the guarantee

Apple’s current default volume format is APFS. APFS is copy-on-write: when you “change” a file, the filesystem may allocate new blocks instead of reusing the old ones in place. A logical overwrite of the file you see in Finder therefore does not necessarily erase older snapshots of the same bytes that might still exist elsewhere on the volume.

SSDs add wear leveling at the firmware level: the blocks you think you are writing may be remapped to different physical cells. That helps longevity, but it means software cannot promise physical bit erasure from user space.

Practical takeaway:

  • Secure delete still maximizes logical coverage — it is far stronger than deleting a file once.
  • For nation-state or lab forensics, the realistic mitigation on a Mac is FileVault full-disk encryption (data at rest is useless without keys) plus controlled disposal of the machine.
  • NythyCleaner’s own implementation logs a warning when it detects APFS / SSD-class volumes because it aligns with Apple’s architecture: honest limits beat false promises.

Methods: zero-fill vs DoD passes

NythyCleaner offers three shred methods (see ShredMethod in the app):

MethodPassesPattern (simplified)Edition
Zero-fill1Writes 0x00 across the fileFree
DoD 5220.22-M3Zeros, ones (0xFF), then randomPro
DoD 5220.22-M extended7Extended pattern including multiple random passesPro

The U.S. DoD 5220.22-M style patterns are historical disk-sanitization recipes. They remain a common baseline for “serious” wiping even though modern flash storage interprets them differently than 1990s spinning rust.

How NythyCleaner Secure Delete works (technical)

In the Privacy section, Secure Delete lets you drag and drop files or folders. The service:

  1. Collects every regular file inside the selection (folders are walked).
  2. For each file, opens it for writing without following symbolic links — if something is a symlink, the app refuses to overwrite through it (O_NOFOLLOW), which avoids surprising the wrong target.
  3. Runs each chosen pass: writes blocks of zeros, ones, or cryptographically strong random data from SecRandomCopyBytes across the full file size.
  4. Calls F_FULLFSYNC after passes where implemented — stronger than a plain fsync on macOS to push data toward stable storage.
  5. Scrubs metadata: strips extended attributes (quarantine flags, resource forks, Finder info), truncates the file to zero, renames it to a random UUID (obscuring the old directory entry), then deletes it.

That sequence is designed to maximize what user-space code can do before removeItem.

Using Secure Delete in the app

  1. Open NythyCleaner → Privacy.
  2. Find the Secure Delete card (“Overwrite files before deletion”).
  3. Drop files or folders onto the dashed zone, or add them via the file list.
  4. Pick a method: Zero-fill (fast, included), or DoD 3-pass / 7-pass (Pro).
  5. Confirm and watch the progress bar; a summary shows how many files were processed and bytes overwritten.

If you are on APFS on an SSD, read the in-app warning — it is the same limitation described above.

When secure delete makes sense

  • Spreadsheets, PDFs, or media with personal or client data before you sell a Mac (still pair with signing out, FileVault, and ideally Erase All Content and Settings on Apple Silicon).
  • Journalists, lawyers, or health workers handling sensitive exports.
  • Clearing USB sticks formatted with older filesystems (where overwrite maps more directly) — always check the volume type.

When to rely on encryption instead

If the threat model includes physical seizure of the laptop, FileVault (or erasing the volume cryptographically) beats any third-party shredder. Secure delete helps with individual files; encryption protects everything at once.

Frequently asked questions

Does secure delete work on iCloud Drive files?

Cloud-backed paths may be replaced with placeholders or re-downloaded. Prefer local files you control, or manage deletion from the cloud provider’s tools as well.

Will it speed up my Mac?

No. It is for privacy, not performance.

Can I recover files after secure delete?

The goal is to make casual recovery impractical. No user tool can promise impossibility of recovery against all adversaries on APFS/SSD.

Is Pro required?

DoD multi-pass methods require Pro. Zero-fill does not.

Conclusion

Securely deleting files on a Mac means overwriting data before unlinking it — stronger than emptying Trash, but not magic on APFS and SSDs. NythyCleaner Secure Delete implements multi-pass patterns, full sync, metadata scrubbing, and safe symlink handling, with zero-fill for everyone and DoD-style passes for Pro users.

Pair it with realistic expectations: enable FileVault, understand cloud copies, and use Apple’s erase flows when you decommission a whole machine — then use Secure Delete for targeted files that must disappear as thoroughly as software allows.