Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

Why Are There Duplicate Files on My Computer?

…and should they be removed?

Duplicate files on your computer can happen for many reasons, most of which are legitimate. Think twice about deleting duplicate files.
Files
(Image: canva.com)
Question: Glary Utilities has a section called Remove Duplicates. I tried it and it gets stuck when one chooses “delete all checked files.” The question is: How come there are duplicate files on the computer? If one is working on a file and then saves it, it should go to the original file, not create a new one. An explanation would be very welcome.

I strongly advise against blindly deleting duplicate files. Done incorrectly, you can render your computer unbootable.

Duplicate files happen for several reasons, and surprisingly, what you and I do isn’t at the top of the list.

Become a Patron of Ask Leo! and go ad-free!

TL;DR:

Duplicate files on your computer

Duplicate files show up on your computer for several reasons. Programs install their own copies of needed files to avoid conflicts with other programs. Windows creates duplicates for protection and recovery. Apps save backup copies during updates. Deleting duplicates blindly can cause problems, so I recommend you don’t.

Installed Programs

I’ve talked before about how common it is to have multiple copies — often identical copies — of files that are used by the software installed on your machine. This happens for a variety of reasons, which mostly boil down to programs not wanting to put themselves at risk because of the bad behaviors of other programs.

For example, program A installs a copy of a library of shared code. If program B uses the same library, there are two approaches its installer could take:

  • Program B could notice that there’s already a copy of the library and not install another.
  • Program B could install its own (duplicate) copy.

The problem with the first approach is that program A could be uninstalled or updated or otherwise change or remove the shared library. The net result is that program B could stop working.

To remain in control of their destiny, many programs carry and install their own copy of libraries and support files.

The result? Legitimate, needed, duplicate files on your hard drive.

Windows tries to protect you

Another common source of duplicate files on your computer is Windows itself. Many of the files that make up Windows have duplicate copies.

  • System File Protection is a technology that monitors system files for unexpected changes often caused by malware. When it detects such changes, it restores the files from duplicate backup copies.1
  • In older versions of Windows, a folder called I386 contained a copy of the files on the installation media.
  • If you have a Windows.old folder, that contains the previous copy of the operating system. Many files don’t change from version to version, thus qualifying as duplicates of the files on your current system.

Applications do it, too

Duplicate files in Glary Utilities.
Duplicate files in Glary Utilities. Click for larger image. (Screenshot: askleo.com)

I did a quick duplicate file scan on one of my machines and found duplicates for an assortment of additional reasons.

  • I have multiple versions of some programs installed. Not all files change between versions because things like sample or other support files don’t need to change from version to version.
  • Some applications update themselves by saving the previous version of the file being updated. That can show up as a duplicate depending on the type of duplicate search run.
  • Some applications are organized so that their various sub-components include duplicate files.
  • The system I use to track the files that make up my websites, videos, and more2 maintains a duplicate copy of every file under its control so it can detect local changes.

The list goes on. There were plenty of duplicates I had no definite answer for.

The takeaway here is that many applications install, manage, or maintain duplicate files for a variety of what turn out to be legitimate reasons.

Duplicate files my scan didn’t find

I didn’t find any files that were duplicated through my own actions.

That kind of surprised me, but not terribly much. You and I are typically good at managing the files we control.

As the questioner said, when saving a file in a program like a word processor, the original is overwritten, and no true duplicate results. The same is true for most files we manage.

One exception that comes to mind is downloading the same file twice. We’ve all done it, and the result is two copies of the same file in our Downloads folder with the same base name, possibly followed by a number in parentheses.

(Don’t) Do this

When it comes to deleting duplicates, don’t.

Unless you really know what you’re doing, just don’t. It’s not worth the risk.

As we’ve seen, there are many legitimate reasons for duplicate files. At best, deleting those duplicate files may cause an application or two to misbehave, and at worst will delete a critical file from Windows itself, rendering it unbootable.

If you must delete duplicates, limit yourself to those files you are 100% certain you recognize. For example, if you’ve been managing photographs or music on your PC and suspect you have lots of duplicates, then a duplicate file scan of only those files might be in order.

Even then, I’d think twice about turning over control to that program to perform the deletion. I’d use the information gleaned from the scan to guide more deliberate manual actions.

If you’re running low on disk space, focus on what’s using up the space. More often than not it won’t be duplicate files at all, but something else that’s easier and safer to clean up.

Podcast audio

Play

Footnotes & references

1: This is one use of the mysterious “WinSxS” folder in the Windows folder.
2: Subversion, for those so inclined.

3 comments on “Why Are There Duplicate Files on My Computer?”

  1. I just saw and read your information on duplicate files. About a week ago my e mail (outlook) started to show the name of the same file over and over. Sometimes a long list. Are these duplicate files and the ones I should leave alone ?

    Reply
  2. Hi! I love your website! I have been deleting duplicate files a few times, not really knowing what I was doing. Thought I was clearing space in memory. I have always left the first copy listed and deleted all other listings below it. Is that ok? Is it possible that I deleted something that is causing my laptop to not charge? Thank you for sharing your wisdom with us all!

    Reply
    • Deleting files (duplicate or otherwise) clears disk space, not RAM memory.
      Without knowing how you get the listing of duplicate files, and what those files are, I can’t say whether what you’re doing is safe or not. I would NOT delete duplicated unless I was absolutely certain it was safe.
      Deleting files shouldn’t affect charging.

      Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.