File Hygiene • 5 min read • September 2026

How to Find & Delete Duplicate Files on Mac (SHA-256 Accurate)

Safely eliminate identical redundant files, duplicate photo exports, and downloads without risking false positives.

The Danger of Name-Only Duplicate Finders

Many cheap duplicate cleaner tools match files based strictly on file name and file size. This approach is dangerous: two completely different photo edits or source code files may share the same filename (e.g. IMG_001.JPG or index.ts) and approximate size, leading to irreversible data loss.

The only reliable way to detect true duplicates is through cryptographic byte-level hashing (SHA-256). If two files have the exact same SHA-256 checksum, their binary content is guaranteed to be 100% identical.

Checking File Hashes Manually with shasum

You can verify whether two suspicious files are exact duplicates in Terminal:

# Calculate SHA-256 hash for two files
shasum -a 256 file1.mov file2.mov

While powerful, manually hashing thousands of files across disjoint directories in Terminal is slow and impractical.

⚡ Cryptographic Duplicate Hunter

Instant Duplicate Detection with XrayMac

XrayMac includes a high-speed multi-threaded Duplicate File Hunter. It pairs instant size pre-filtering with cryptographic SHA-256 hashing to discover duplicate videos, raw photos, and downloads across hundreds of gigabytes in seconds. Includes smart "Keep Newest" and "Keep Oldest" bulk actions.

Frequently Asked Questions

Does XrayMac delete duplicate photos inside Apple Photos library?

XrayMac respects Apple's Photos SQLite database integrity and targets folders in your home directory, Downloads, Documents, and external drives safely.

XrayMac

XrayMac Engineering Team

Pure Swift 6 & APFS storage diagnostics for macOS Sonoma & Sequoia.