How to Find and Remove Duplicate Photos Safely

Open internal hard disk drive with the platter and read arm visible, lying on a light grey surface
Photo by Nick on Unsplash. Duplicate photos pile up on storage like this, which is where the clean-up has to happen.

To find duplicate photos, first decide which kind of duplicate you have. Byte-identical copies are found reliably by comparing file checksums. Re-saved or resized copies share a capture time and camera data but not bytes. Near-identical burst frames need a visual comparison and your judgement. Back up everything first, move suspected duplicates to a quarantine folder instead of deleting them, and keep the copy that carries your edits and metadata.

Why duplicate photos pile up

Almost nobody creates duplicates on purpose. They come from ordinary habits that each make sense on the day, and they add up quietly over years. Knowing the cause tells you where to look and which copy is likely to be the real one.

  • Importing the same card twice. You import a card, forget to format it, shoot more, and import the whole card again. Every photo from the first session now exists twice, often in two dated folders.
  • Phone plus cloud sync. A phone uploads to a cloud library, the cloud library syncs to the computer, and you also copy the phone over a cable. The same picture arrives by two routes with two different names.
  • Exports mistaken for originals. A finished JPEG exported for sharing gets filed next to the originals, then imported back in as if it were a new photo. Read how exporting works to see why an export is a copy, not a master.
  • RAW and JPEG pairs. A camera set to record both writes two files per press of the shutter. They are not duplicates in the harmful sense, but they double the count and confuse simple tools. The difference between RAW and JPEG explains what each file holds.
  • Backup restores. After a drive scare you restore a backup into a new folder “just to be safe”, and the old folder never gets removed.
  • Merging old drives and family archives. Two people each kept copies of the same holiday, or an old laptop gets copied wholesale onto a new drive. This is common when building a family photo archive.

The three kinds of duplicate, and how each is found

The word “duplicate” covers three different situations. Tools that treat them as one problem either miss most of your duplicates or suggest deleting photos you wanted. Sort the problem into these three, and the right method follows.

1. Exact copies: same bytes

An exact copy is the same file, bit for bit, possibly under a different name or in a different folder. This is what double imports and restored backups produce. It is the only kind you can find with certainty.

The method is a checksum (also called a hash). A program reads every byte of a file and produces a short fingerprint, such as a 64 character SHA-256 value. Two files with the same fingerprint are, for any practical purpose, the same file. Change a single byte, for example by adding a keyword inside the file, and the fingerprint changes completely.

Good duplicate finders speed this up in stages: they first group files by exact size, since files of different sizes cannot be identical, then hash only the files that share a size. On a library of 50,000 files this means only a fraction ever gets fully read.

2. Same photo, different file

Here the picture is the same moment, but the file differs. Common cases: a full-size original and a smaller copy made for email, a JPEG re-saved after a crop, a file that had its metadata rewritten, or a phone photo that a cloud service converted to another format. Checksums will not match, so a checksum-only tool reports these as different files.

The useful clue is the data the camera wrote at the moment of capture. The EXIF data holds the capture date and time down to the second (often with fractions of a second), the camera model, the exposure settings and often the original file number. Two files with the same capture time to the second, the same shutter speed, aperture and ISO, and the same original file number are almost certainly the same photo. Compare by capture time, not by the file’s “date modified”, which changes every time a file is copied or edited.

Watch for two traps. A camera with its clock never set may stamp the same default date on thousands of photos, so time alone is not enough: combine it with the file number and exposure settings. And two cameras shooting the same event can produce frames at the same second that are genuinely different photos.

3. Near-duplicates: frames that look almost the same

A burst at 10 frames per second for 3 seconds gives 30 frames that look almost identical as thumbnails. So do exposure brackets, focus stacks and the five frames you took of the same sunset while adjusting composition slightly. These are separate photos, each with its own capture time.

Software finds them by visual similarity: it shrinks each image to a tiny version and compares the patterns of light and dark, so photos that look alike score as close matches even when sizes and formats differ. This is helpful for spotting groups, but it is a suggestion, not a verdict. A similarity tool cannot tell which frame has the sharp eyes or the better expression. Choosing between near-duplicates is culling, and it belongs in your photo culling workflow, not in an automated clean-up.

Kind Typical cause Detection Safe to remove automatically?
Exact copy Double import, restore Checksum Yes, after review
Same photo, different file Export, resize, re-save Capture time and camera data No, choose by hand
Near-duplicate Burst, bracket, re-shoot Visual similarity No, this is culling

Which copy do I keep?

When two files really are the same photo, the question is not which is older but which one holds the most of your work. Walk through these questions in order and stop at the first one that decides it.

  1. Is one of them the original from the camera? A RAW file or the camera’s own JPEG at full resolution beats any export, resize or re-save. An export can always be made again from the original. An original cannot be rebuilt from an export.
  2. Does one carry your edits? If your editing software stores edits in a catalog or a sidecar file (often a small .xmp file with the same name), the copy that the catalog points to, or that has the sidecar beside it, is the one with your work attached.
  3. Does one carry your metadata? Keywords, captions, ratings, names of people and location data take real time to add. Look at the photo metadata on both copies. Keep the richer one, or copy the metadata across before removing the other. Hours of keywording photos can live in one copy and not the other.
  4. Is one at full resolution? Compare pixel dimensions, not file size. A 6000 by 4000 pixel file holds 24 megapixels; a 2048 by 1365 pixel copy holds about 2.8 megapixels, roughly a ninth of the detail.
  5. Is one in the right place? If everything else is equal, keep the copy that sits in your proper folder structure and remove the stray. The photo file management guide covers how to set up folders so there is a clear “right place”.

If two copies each hold something the other lacks, for example one has your edits and the other has your keywords, do not delete either until you have merged them into one.

A safe procedure for removing duplicates

The real danger in a duplicate clean-up is not leftover duplicates. It is deleting the only copy of something because a tool or a tired eye got it wrong. This procedure is built so that every step can be undone.

Step 1: Make a complete backup first

Before any tool touches your library, make sure a full, current backup exists on a separate drive, and ideally a second copy somewhere else. If anything goes wrong later, this is what you go back to. The photo backup guide explains how to set one up and check that it can actually be restored. Do not count the duplicates themselves as your backup: once you start removing them, that “backup” disappears.

Step 2: Close your photo software and decide where the truth lives

If you use cataloging software, it keeps its own record of where every file is. Removing or moving files behind its back leaves it with missing photos, broken edits and lost links. Decide up front whether you will clean up inside the software (safer, because it updates its records as it goes) or in the file system (then expect to reconnect or remove missing entries afterwards). For one catalog-based program, see fixing organizational problems in Lightroom.

Step 3: Start with exact copies only

Run a checksum-based scan first. It produces groups of files that are truly identical, so the only decision is which location to keep. Prefer the copy inside your main folder structure and remove the one in a stray folder such as “Import 2” or “Restored”.

Step 4: Quarantine, do not delete

Move every file you plan to remove into a single quarantine folder on the same drive, keeping its original folder path inside it if your tool allows. Leave it there for a few weeks while you use your library normally. If a photo turns out to be missing, it is one move away. Only then delete the quarantine folder, while your backup still holds everything.

Step 5: Handle “same photo, different file” by hand

Sort the remaining suspects by capture time and go through matching groups with the “which copy do I keep” questions above. This is slower, but each decision is quick once you know what you are comparing.

Step 6: Leave near-duplicates for culling

Burst frames and brackets are a choice about pictures, not a storage problem. Rate and reject them in your normal culling, where you can compare them at full size. Software that groups similar frames, including AI photo culling tools, can speed this up, but the final pick stays yours.

Step 7: Check the result

Compare the photo count before and after against what you expected. If you removed 3,000 exact copies from 40,000 files, you should now have 37,000. Open your photo software and confirm it reports no missing files. Spot check a few dated folders from different years.

Preventing duplicates in the first place

  • Use one import path. Pick a single way photos enter your library and stick to it. Most import tools can skip files already imported; leave that option on.
  • Format cards in the camera after each verified import. Once the files are in your library and in a backup, format the card so it cannot be imported twice. The guide to memory card speed, capacity and reliability covers card care.
  • Choose one route for phone photos. Either sync through a cloud library or copy by cable, not both. Cloud photography explains how sync services move and convert files.
  • Keep exports out of the originals. Send exports to their own folder outside your library, and give them a name suffix so they never look like masters.
  • Rename consistently on import. A name built from capture date, time and the camera’s file number makes duplicates obvious when two files share a name. See how to rename files in Lightroom for one way to set this up.
  • Move libraries with the software, not around it. When changing drives, follow a planned move so nothing gets copied twice. See how to move your Lightroom catalog and photos.

Common mistakes when removing duplicate photos

  • Trusting file names. Cameras reuse file numbers after a counter wraps around or a reset, so two different photos can share a name like IMG_0001. Same name does not mean same photo, and different names do not mean different photos.
  • Trusting “date modified”. Copying, restoring and editing all change it. Use the capture time in the EXIF data instead.
  • Keeping the larger file without looking. A larger file is not always the better one. A re-saved JPEG at maximum quality can be larger than the camera original while holding less real detail.
  • Deleting one half of a RAW and JPEG pair. If you shot both on purpose, they are not duplicates. Decide as a policy whether you keep both, then apply it to everything instead of photo by photo.
  • Letting a tool auto-delete near-duplicates. Visual similarity groups frames that look alike as thumbnails. The frame it keeps may have closed eyes or missed focus.
  • Cleaning up without a backup. A clean-up removes files by design. Without a separate backup, one wrong rule means permanent loss. If it has already happened, recovering deleted photos explains what can still be done.
  • Working behind your catalog’s back. Moving files in the file system while cataloging software expects them elsewhere breaks links to edits and metadata.

Try this: a 10-minute duplicate test

This exercise shows you, on a small scale, how each kind of duplicate behaves, so you can trust or question what a tool reports on your full library.

  1. With a camera or phone, take one photo of a still object. Then take a quick burst of five frames of the same object.
  2. Copy all six files to a new test folder on your computer. Then copy the single photo a second time into a subfolder, and rename that copy.
  3. Open the single photo in any editor, resize it to half its width, and save it as a new file.
  4. Run any duplicate finder you have on the test folder, first in exact or checksum mode, then in similar-image mode if it offers one.

How to judge the result: the checksum scan should match the original and its renamed copy, and nothing else. It should not match the resized version or any burst frame. The similar-image scan should group the resized copy with the original, and group the burst frames together. Now check the capture times in each file’s details: the resized copy should keep the same capture time as the original if your editor preserved the metadata. If it does not, you have learned that your editor strips metadata, which matters for step 3 of “which copy do I keep”.

FAQ

Is it safe to let software delete duplicates automatically?

Only for exact copies found by checksum, and even then move them to a quarantine folder instead of deleting. For resized copies and similar-looking frames, automatic rules make mistakes that you only notice months later. Review those groups yourself.

Are RAW and JPEG files of the same shot duplicates?

Not in the sense that one is a spare. They are two versions of the same exposure, one with full sensor data and one processed by the camera. Many people keep the RAW and remove the JPEG once they are sure they will not need the camera’s own processing, but make that a deliberate decision, not something a duplicate tool does for you.

Why does my photo software show two copies when I only have one file?

Many catalogs allow virtual copies, which are extra sets of edits pointing at one file on disk. Removing a virtual copy deletes only those edits, not the photo. Check whether the “duplicate” points to the same file location before deleting anything.

Should I compare by file size?

File size is a good first filter for exact copies, because identical files always have identical sizes. It is useless on its own for other kinds of duplicate, since the same photo saved twice at different quality settings gives different sizes. Use size to narrow the search, then a checksum to confirm.

How do I handle duplicates across two drives?

Scan both drives together so the tool can compare across them, and decide in advance which drive is the master. Remove copies only from the other drive. If the second drive is your backup, leave it alone: duplicates between your library and your backup are exactly what a backup should be.

Want a folder structure that stops duplicates from returning?

Not sure your backup would survive a clean-up gone wrong?

Need a faster way to choose between burst frames?

What exactly is stored inside a photo file besides the picture?

Deleted the wrong copy already?