Remove Duplicate OneDrive From File Explorer [Guidebook]

Written By Farhan Bin Matin

You were working on your wife’s OneDrive account & after finishing the work, you found that OneDrive was updated in the background. What’s surprising is that there are now two OneDrive folders in the File Explorer.

remove-duplicate-onedrive-from-file-explorer

Well, this issue happens to many other people, so don’t be scared.

In this article, I will explain how to resolve the issue of duplicate OneDrive folders in File Explorer, including removing duplicate files inside the OneDrive folder. Let’s dive in.

How Do I Remove Duplicate OneDrive Folders from File Explorer

Now, there can be two scenarios for the duplicate OneDrive folder on the Windows File Explorer. I’m presenting both cases.

To begin with the first scenario, you will have a double OneDrive folder in the File Explorer or two OneDrive icons in the task manager for logging in with two different accounts. duplicate-onedrive-folder-icon

Before logging in to my business OneDrive account, I had only one personal OneDrive folder. The cloud icon was white-colored. After logging in with my business account, another OneDrive Business folder was created in my File Explorer. This time, the OneDrive icon in the task manager appeared in blue.

Now, in this case, I wanted to remove my personal OneDrive folder from the file explorer & to do that, I unlinked my personal account. So, how to remove the OneDrive personal folder from file explorer? Follow as below to do so,

  • Search the white OneDrive cloud icon from the bottom taskbar.
  • Click on the icon & click again on the gear icon (Help & Settings).
  • Select Settings from the list. onedrive-settings
  • Go to the Account tab from the left side.
  • Select Unlink this PC.
  • Choose Unlink account from the pop-up window. onedrive-unlink-account

This will unlink the OneDrive personal account from the PC & after that, there will be a single OneDrive folder in the file explorer.

That was an easy part. But that’s not all, there’s something else you might encounter to tackle. Remember the second scenario I was talking about? In this case, you will have two same OneDrive folders with the same account. This means they are duplicates; if you create or delete from one OneDrive, then the effect will also happen on the other OneDrive folder. duplicate-onedrive-folder-in-file-explorer

The first time I saw this issue was on one of my co-worker’s PCs. He updated to Windows 11 & there was this duplicate OneDrive folder on the Explorer. There were two accounts logged in, but OneDrive was only detecting one account & syncing that.

It started irritating, as initially, we tried to stop OneDrive from syncing & reinstalled OneDrive without any success. Later, I found it was a File Explorer namespace bug & registry modification can fix it. We applied the method & it worked!

Here are the steps to remove duplicate OneDrive from the file explorer with regedit:

  • Press Win+R, type regedit in the box & hit OK.
  • Navigate to this address Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace.
  • Click on the folders under NameSpace & verify if the data value on the right side is the same name as your OneDrive folder name. namespace-in-regedit
  • Keep one folder & right-click on the other folder & select Delete. delete-duplicate-namespace-folder

Now, reboot your device & check that your duplicate OneDrive folder in File Explorer is gone. Note that this can cause other severe issues if you incorrectly modify the registry keys. So do the registry edit cautiously & make a backup, so you can restore it if anything goes wrong.

If you’re still worried about deleting a registry key & don’t want to take the risk, there is an alternative way. To do this, note down the folder names under NameSpace, containing your OneDrive folder names in the Data section.

Then, follow as below,

  • Open up the registry editor again if you closed it.
  • Navigate to Computer\HKEY_CLASSES_ROOT\CLSID.
  • Find the folder name you noted down. (for me, it’s 018D5C66-4533-4307-9B53-224DE2ED1FE6) namespace-folder-name
  • Search for the IsPinnedToNameSpaceTree key inside that folder.
  • Click twice on that key & set the value to 0 from 1. system.ispinnedtonamespacetree

Restart the system & check that the extra replicated OneDrive is deleted.

You can also use Windows Group Policy Editor to remove two OneDrive icons if you are a Windows Pro or Enterprise editions user. Follow as below to resolve the OneDrive folders duplication issue with gpedit.

  • Open run command with Win+R & enter gpedit.msc to open Group Policy Editor. run-gpedit.msc
  • Click on Administrative Templates under the Computer Configuration section from the left side. gpedit-administrative-templates
  • Expand Windows Components & then OneDrive.
  • Click Twice on Prevent the usage of OneDrive for file storage from the right panel. prevent-the-usage-of-onedrive-for-file-storage
  • Choose Enabled from the left side & hit OK. enabled-ok

Now, restart the PC & verify that the issue is resolved.

FAQs

How do I fix duplicate OneDrive folder icons in Explorer?

You can reset OneDrive or relink the account to solve double OneDrive folder icons in Explorer.

How to Remove Duplicate Files in OneDrive?

To remove duplicate files in OneDrive, you can go into the OneDrive folder, sort files by Name, select the duplicate files & delete those files. You can also use 3rd-party duplicate finder apps to do the task easily.

Why does OneDrive duplicate files?

Two identical OneDrive files can occur for syncing the same file on two devices or uploading the same file two times. Due to some sync problems, this can occur, or users can sync the files twice by mistake.

How to reset OneDrive?

Search command prompt in Windows search & run it as an administrator. Type %localappdata%\Microsoft\OneDrive\onedrive.exe /reset & hit enter. This will reset OneDrive.

Final Thought

Having the same OneDrive folders twice in File Explorer can be distracting & awkward. If one is a personal account & the other one is a business account, you can simply unlink one account to get rid of the double OneDrive folder from the file explorer.

If it’s the same account’s OneDrive folder, then you can use the registry method mentioned in this article to solve your issue. For further queries, please leave a comment.

About The Author
Farhan is a tech researcher and enthusiast. He’s been into tech and gaming since he got a PS2 in his childhood.Currently, he’s almost done with his undergrad.Besides testing and researching geeky stuff, Farhan has an utmost passion for photography.

Leave a Comment