One command prints which photos in a folder are byte-for-byte copies, which one it would keep, and how much space the extras use. It is a dry run: it never deletes or moves anything.
python3 tidy_dupes.py ~/Pictures
Download tidy_dupes.py (about 100 lines, plain Python 3, no extra packages).
sha256: 8ba96b8203cca12dc30764d667b83432009c09bbbd63e5dff35f97501885bcfd
Check it with sha256sum tidy_dupes.py. Read the source before you run it: github.com/ZoomZeem/tidy-dupes (MIT licence).
The free, open-source czkawka_cli on your PATH. Check the file's sha256 on the release page before you run it.
Built by the Zoomzeem studio.