Replace existing duplicate files on APFS with clones Is there a way to use the copy-on-write cloning feature of APFS to reclaim space from existing duplicate files?

When you copy a file on APFS, it doesn't actual duplicate the file blocks, instead it just clones the metadata. That prevents it from using any more space until you actually make an edit to the duplicate file. It seems like there should be some tool to find existing duplicates and replace them with clones, reclaiming the space used to store the duplicate.

Related questions on Apple Communities and the MacRumors Forums don't have anything.
As of June 2020, Jdupes can do this.
For example, this will find all duplicates in your Applications folder:
jdupes --recurse --dedupe /Applications/ 

WARNING: Versions before 1.19.0 will overwrite metadata (date, owner, permission), more recent versions preserve all metadata when using jdupes --dedupe on APFS filesystems.