Stop OneDrive Migration Duplicates: Safe Fix & Verify
In this article
OneDrive migration duplicates happen when files are copied twice during a move—often from a sync client re-uploading files or from a migration tool that runs twice. The safe fix is to identify and merge duplicates without deleting anything permanently, then verify that your original file structure is intact. You'll need access to the OneDrive web app and, ideally, a backup of the migrated folder.
What You'll Need
- Access to the OneDrive website (onedrive.com) with an account that has edit permissions.
- A backup of the migrated folder (if possible) to avoid any risk of data loss.
- Patience—do not rush the process, as deleting duplicates incorrectly can remove original files.
Step-by-Step
- Stop any active sync. If you have the OneDrive desktop app running, pause syncing. Right-click the OneDrive cloud icon in the system tray (Windows) or menu bar (Mac), select Pause syncing, and choose a duration like 2 hours. This prevents new duplicates from being created while you work.
- Open OneDrive in a web browser. Go to onedrive.com and sign in. Use a browser you don't normally use for syncing, or open an incognito/private window, to avoid interference from the desktop client.
- Navigate to the affected folder. Find the folder that has duplicates. Look for files with names like file.docx and file (1).docx or file - Copy.docx. These are typical duplicate naming patterns.
- Sort by name. In the OneDrive web view, click the Name column header to sort files alphabetically. This groups duplicates together, making them easier to spot.
- Compare file details. For each set of duplicates, check the Modified date and file size. Hover over a file and click the checkmark circle to select it, then click Details (the circle with an 'i' icon) in the top toolbar. Note the last modified date and size for each duplicate.
- Identify the original. The original file is usually the one with the earliest modified date or the one without a number in parentheses. If you're unsure, open both files and compare content. Do not rely on file size alone—two versions could have the same size but different content.
- Move duplicates to a separate folder (do not delete yet). Create a new folder called Duplicates_Check inside your OneDrive. Select all duplicate files (not the originals), then click Move to in the top toolbar and choose that folder. This keeps them safe while you verify.
- Verify the originals are intact. After moving duplicates, open each original file to confirm it opens correctly and contains the expected content. Check that the folder structure is as you expect.
- Check for duplicate folders. Sometimes entire folders are duplicated. If you see two folders with the same name (e.g., Reports and Reports (1)), open both and compare contents. If one is a subset of the other, move the extra items into the main folder, then move the empty duplicate folder into Duplicates_Check.
- Delete the duplicates folder after a week. Once you're confident that the originals are correct, go to Duplicates_Check, review the files one last time, and then delete it. Remember: deleting from OneDrive sends items to the recycle bin, so you can still recover them for 30 days (or longer for business accounts).
- Resume syncing. Go back to the OneDrive desktop app, right-click the cloud icon, and select Resume syncing. Let the client sync completely—this may take a while if you have many files.
- Final verification. After syncing, check a few random files on your local machine to ensure they match what you see in the web app. Also, check the OneDrive recycle bin to confirm that no original files were accidentally deleted.
Common Mistakes
- Deleting duplicates immediately. You might delete the wrong file. Always move duplicates to a holding folder first and verify originals.
- Using the desktop app to sort and delete. The desktop sync client can re-upload or re-download files, creating more duplicates. Use the web app for the cleanup process.
- Ignoring file versions. OneDrive keeps version history, but if you delete a file, the versions go with it. Don't rely on version history as a backup for deleted files.
- Not pausing sync. If you delete a duplicate while the client is syncing, the client might re-download it from the cloud, undoing your work.
Tips
- Use the OneDrive web app's 'Sort by name' and 'Group by' options. In the view menu, you can group by name to see duplicates in clusters.
- If you have a large number of duplicates, use the search bar. Type the base file name (e.g., report) and then filter by 'Files' to see all versions.
- For business accounts, check if your admin has enabled 'Files On-Demand'. If so, you can see files without downloading them, making the comparison faster.
- Consider using a third-party duplicate finder (like CCleaner or Duplicate Cleaner) on the local synced folder—but only after you've paused sync and made a backup. These tools can compare file hashes to find exact duplicates.
Troubleshooting
If the duplicates are still appearing after you've cleaned up:
- Check if the migration tool is still running. If you used a migration service (like SharePoint Migration Tool), ensure it has completed. If it's still running, it will re-create duplicates. Stop the tool and re-run it only after cleaning.
- Check for multiple OneDrive accounts. If you have a personal OneDrive and a work OneDrive, they might be syncing to the same folder. Sign out of one account in the desktop app and see if duplicates stop.
- Clear the OneDrive cache. On Windows, press Win+R, type %localappdata%\Microsoft\OneDrive\ and delete the contents of the cache folder (this does not delete your files). Then restart OneDrive. On Mac, go to ~/Library/Application Support/OneDrive and remove the cache folder. This forces a fresh sync.
- If you accidentally deleted an original file, go to the OneDrive recycle bin (web app), select the file, and click Restore. Do this before deleting the Duplicates_Check folder.
Frequently Asked Questions
Will moving duplicates to a folder break any shared links?
Yes, if you move a file that has a shared link, the link will break. If you need to preserve links, keep the original file in place and only move the duplicate—but if you're unsure which is the original, check the 'Shared' column in the web app to see which file has sharing active.
Can I use the OneDrive desktop app to compare files?
Yes, but only after pausing sync. You can compare file sizes and dates in File Explorer, but be careful not to delete anything until you've verified via the web app.
How do I know which file is the original if both have the same modified date?
Open both files and compare content. If they are identical, it doesn't matter which you keep—delete one. If they differ, check the file's version history (right-click > Version history) to see which has more edits.
What if the duplicates have different names (not just numbers)?
If the names are completely different, they might not be duplicates—they could be different files. Check the file content before moving anything. Only move files that are confirmed duplicates.
Will this process work for SharePoint or Teams files?
Yes, the same steps apply if you have OneDrive syncing SharePoint libraries. The web app for SharePoint (in Microsoft 365) works similarly, but the folder structure may be different. Use the SharePoint document library's web interface to do the cleanup.
How long does the recycle bin keep deleted files?
For personal OneDrive accounts, files stay in the recycle bin for 30 days. For business accounts, the default is 93 days, but your admin can change it. After that, they are permanently deleted.