Diff two iPhoto libraries to check if they contain the duplicate photos
Create a new library,
import the images from both libraries (https://support.apple.com/en-us/119920)
View > Utilities > Duplicates
or use jdupes or czkawka on both directories.
On the phone itself?
Create a new library,
import the images from both libraries (https://support.apple.com/en-us/119920)
View > Utilities > Duplicates
or use jdupes or czkawka on both directories.