You have to be very careful, when selecting a Duplicate cleaner. Some of them are dangerous and can destroy the Photos Library beyond repair and you might lose all your photos. Apple is warning against such apps, see: Using third-party apps to remove duplicate photos might damage your Photos for macOS library - Apple Support
- Make a current backup copy of the library before trying any of these programs. test the backup.if it is readable.
- Use only a duplicate detector, that is moving the photos to an album in Photos, so you can use the Photos.app to delete them. The dangerous applications are the ones, that are modifying the Photos Libraries behind Photos's back.
Photos has a built-in duplicate detector, that will alert you, when you are trying to import duplicates of already imported photos. If you are seeing duplicates nevertheless, you may have made a mistake, when importing photos, or the duplicates are not duplicates but similar photos in d different format, size, or state of edit. In that case you cannot remove them automatically anyway, but have to select the keepers manually, to be sure you are keeping the best version, with the most recent edits, the best resolution, the correct metadata, the version you placed already into an album or are using in a project.
Usually it is much safer to find out first, why you are seeing duplicates and what kind of duplicates you are having to deal with - similar photos or exact duplicates.
- PowerPhotos can find exact duplicates or different versions, based on the file metadata (filename, capture date).
- Photo Sweeper can compare the contents of a photo based on histograms and bitmaps, and can find similar photos in a different size or format.
Both programs will suggest duplicates for deletion, but I am always comparing them manually, pick the best version or keep all of them, and never delete a single photo sight unseen.