windows
Are duplicate files safe to delete? What a duplicate finder cannot know
Often not. Identical bytes do not mean a spare copy: programs load libraries from their own folder, Windows keeps one file under several names through hard links, and dependency folders carry copies on purpose. Only treat files as duplicates inside your own documents, photos and downloads - never inside an installed program, a system folder or a code project.
5 min read
The first time we pointed our own duplicate finder at a whole C: drive, it offered up 3,145 files, 25.1 GB, all ticked and ready for the Recycle Bin. Among them was msalruntime_x86.dll, sitting in the Visual Studio Installer’s own folder. The copy it had decided to keep was in a temp directory that Windows would clear on its own schedule.
That is not a bug in the hashing. The two files really were byte-for-byte identical. It is a bug in the idea that byte-for-byte identical means one of them is spare.
three reasons the same bytes exist twice on purpose
Programs ship their own copies
A Windows program loads its libraries from its own directory first. That is deliberate: shipping the exact DLL it was tested against is what stops it breaking when something else upgrades a shared one. So the same library legitimately exists inside five different program folders, and each of those five programs needs the copy in its folder. A scanner sees one file and four wins.
Windows keeps one file under several names
The component store, WinSxS, is largely hard links - a second name for the same data on disk, not a second copy. Deleting one name frees nothing at all, because the data stays as long as any name points at it. You get zero space back and a missing path.
Dependency trees copy on purpose
node_modules, Python virtual environments, game asset packs, Unity libraries: these duplicate files per project so each project stays self-contained and reproducible. Deduplicating across them is how you get a project that builds on Tuesday and not on Wednesday, with no change in the repository to explain it.
what should never be in the scan
The working list, in the order it removes the most danger. A duplicate finder that does not do this is asking you to audit thousands of paths by eye:
Windows,Program Files,Program Files (x86),ProgramDataandAppData- by known-folder path and by name, because on a real profileAppDatais not even marked hidden.- Any folder registered by an installed program, plus game libraries - Steam, Epic and the rest keep enormous identical asset files per title.
- Code projects. A folder containing
.gitis the reliable signal; your home directory is not. - Hidden and system files, dot-folders, and files whose extension makes them program material - executables, libraries, virtual machine disks.
- Anything with a link count above one. That is a hard link, and removing it saves nothing.
What is left is the part that was always the point: your documents, photos, music, downloads and desktop. That is where real duplicates live - the same invoice saved twice, a photo import run twice, the installer you downloaded in March and again in August.
the OneDrive trap
Files in OneDrive, iCloud Drive or Dropbox may be placeholders: a name and a size on disk with the contents still in the cloud. To hash one, a scanner has to read it - and reading it downloads it. Point a duplicate finder at a synced folder and you can pull your entire cloud drive onto a laptop with 40 GB free, which is the opposite of the errand you set out on.
A well-behaved scanner checks the placeholder attributes on the open file handle and skips anything not already local. If yours does not document this, test it on a small synced folder and watch your free space before trusting it with the big one.
the size check nobody does
There is one more way this goes wrong, and it is the reason that 25.1 GB figure is worse than it looks. The Recycle Bin is not a folder that grows - it has a fixed size per drive, and on that machine it was 25.8 GB. Sending 25.1 GB into it would have evicted nearly everything already in there, and a batch any larger than the cap is destroyed outright rather than recycled. A bulk cleanup is exactly the situation where “it’s fine, it goes to the Recycle Bin” stops being true.
doing it safely
- Scan one folder, not the drive. Pictures, then Downloads, then Documents. If a tool only offers “scan C:”, that tells you how much thought went into it.
- Check the keep rule. “Keep the oldest” and “keep the newest” both routinely keep the wrong one. Better: keep the copy that is not named like a copy and not sitting in Downloads or on the Desktop - the one something is most likely to be pointing at.
- Verify at the moment of deletion, not at scan time. Minutes or hours pass between a scan and a click. A copy should be re-hashed immediately before it is moved, along with the copy that is staying.
- Never let the last copy go. Obvious, and a sort order plus a “select all” button has broken it in more than one tool.
- Delete in batches your Recycle Bin can hold, or move to a
to-deletefolder and wait a week.
the part no scanner can know
We still got one wrong after all of that. A project without a .git folder looks like ordinary documents, and two identical audio tracks inside an audiobook folder were offered as duplicates - they were two chapters that genuinely had the same silence in them, or the same file legitimately placed twice by whatever produced the audiobook. From the outside, a file cannot say why it exists.
Which is why the last line of defence is not smarter rules. It is that everything goes to the Recycle Bin, the batch is small enough to fit, and you can put it back.
A duplicate finder that leaves most of your disk alone.
owntools scans only your own files, skips hard links and cloud placeholders, re-hashes every copy right before it moves it, and prints what it deliberately left out and why - including how many files in installed programs and code projects it refused to consider.
see the disk toolWho wrote this. We build owntools, which includes a disk analyser. Every rule above was added after our own tool offered something it should not have - the Visual Studio DLL came out of a real run on a real machine, not a hypothetical.
questions people ask
Is it safe to delete duplicate files found by a duplicate finder?
Only where the copies are your own documents, photos, music or downloads. Anything inside Windows, Program Files, ProgramData, AppData, an installed game or a code project should be left alone, because a second copy of a file there is usually a copy the software needs in that exact location. A scan of a whole system drive will offer thousands of such files - on one real run, 3,145 files and 25 GB of them - and almost none of them are safe wins.
Why do the same files appear twice in Windows?
Three ordinary reasons. Windows keeps a component store, WinSxS, where system files are hard links to the same bytes, so a scanner sees two paths and one file. Programs ship their own copies of shared libraries so they do not depend on a system-wide version. And dependency trees - node_modules, Python virtual environments, game asset packs - deliberately duplicate files per project so each project stays self-contained.
What is a hard link, and why does it matter here?
A hard link is a second name for the same data on disk, not a second copy. Deleting one name frees nothing until the last one is gone, so "reclaiming" hard-linked duplicates saves no space while quietly breaking whatever used that name. A file's link count says how many names it has, and anything above one should be skipped.
How much space do real duplicates actually take?
Far less than a scan suggests. On one Windows profile, restricting the scan to the person's own files left 4 groups totalling 228 MB out of 277 files compared, while the excluded areas held 23,725 files in installed programs and 6,118 in code projects. Duplicate photos and downloads are worth clearing; duplicate DLLs are not yours to clear.
read next
5 min read
How to dictate on Windows without sending your voice to the cloud
Windows' Win+H voice typing streams audio to Microsoft's servers. Voice Access, Whisper and Parakeet do not. What each one costs you in accuracy and setup.
read it →
5 min read
Screen recording that zooms in by itself, on Windows
Screen Studio is macOS only. What auto-zoom actually does, the three ways it gets implemented badly, and how to test any tool for them in five minutes.
read it →