Find duplicates and write to duplicates-report.txt
find . -type f -exec cksum {} ; | sort | tee /tmp/f.tmp | cut -f 1,2 -d ' ' | uniq -d | grep -hif /dev/stdin /tmp/f.tmp > duplicates-report.txt
Delete duplicates based on duplicates-report.txt
sort -k1,1 duplicates-report.txt --stable | gawk -F' ' '{if ( $1==old ) { print $3 }; old=$1; }' > duplicates-only.txt | xargs rm
AnyDupeCleaner is a very reliable and efficient tool for finding and deleting duplicate files on Windows and Mac. And the process is simple and straightforward.
Download and install the app directly from the following link:

Launch the app, then hit the “+” at the bottom to add folders. I usually scan Downloads, Documents, and my Pictures folder.
Want to scan just photos? Or ignore system files? You can tweak filters — file type, size range, date, and more. (I unchecked system folders to speed things up.)
Hit "Scan" and let it do its thing. For me, it took under 2 minutes to go through 20,000+ files.
You'll get a nice list grouped by file name, size, or even exact content. You can preview photos, videos, or documents before deciding.
One thing I particularly like is that AnyDupeCleaner automatically determines the modification date of the file, and by default keeps the original file with the earliest date, and selects the newer duplicates for deletion.In other words, if you have three identical photos, the system will keep the earliest one (usually the one you saved originally) instead of accidentally deleting the original one. This way, you don't have to worry about the important original file being accidentally deleted, which is very suitable for people who have multiple versions of photos or work documents.
Click the Select All button to keep one copy and delete the rest. Then just hit "Delete", and boom — space saved. On my computer, A total of 4278 photos were deleted successfully!
Download the trail version here, really worth a try!

After using AnyDupeCleaner, I cleared almost 9 GB of duplicates I didn't even know existed. The UI is clean (feels native to macOS), and I never had to read a manual or Google anything. For someone who hates over-complicated tools, that's a win.
Run this once every couple of months — especially if you're a digital hoarder like me. Your SSD (and sanity) will thank you.





