How to Find and Remove Duplicate Files in OneDrive
Founder and CEO, The Drive AI
TL;DR: OneDrive has no built-in duplicate finder, and neither Copilot nor SharePoint adds one. You can find the obvious copies by hand: search for copy markers, sort by name and size, and check the largest files in your storage page. The reliable test is a content hash: Microsoft stores one for every OneDrive file, but doesn't show it. Decide which copy to keep first, and lean on the Recycle Bin: 30 days on personal accounts, 93 on work accounts.
Disclosure: The Drive AI publishes this guide and makes a file agent that finds duplicates in OneDrive. Microsoft's own features come first below, checked against Microsoft's support pages in October 2026.
Duplicates pile up in OneDrive from saved attachments, folders copied "just in case", and backups rerun after a new laptop. None of them says "duplicate": they have different names, live in different folders, and were made months apart.
How do you find duplicate files in OneDrive?
OneDrive can't list duplicates for you. To find them by hand, search for copy markers such as "copy" and "(1)", sort folders by name and size so matching files sit together, and review the largest files on your storage page first. To prove two files are identical, compare a content hash, which needs a script or a tool that reads it.
Step 1: Search for copy markers
In OneDrive on the web, search for copy, (1) and (2). Downloads that were saved twice and re-uploaded often carry these. Also search for your computer's name: Microsoft documents a sync problem where "a duplicate file is created with your computer name added to the filename," giving book1-desktop-computer.xlsx as the example. (Microsoft Support) If that's what you see, fix the cause before cleaning up, or the copies come back. Microsoft's fix is to refresh the stored OneDrive credentials on the computer and restart OneDrive. (Microsoft Support)
Step 2: Sort by name, then by size
Open a folder in list view and sort by Name. Files with the same or nearly the same name end up next to each other. Then sort by File size. Two files with the exact same size and similar names are probably the same file.
Step 3: Start with the largest files
The space is in a few large files, not thousands of small ones. On a personal account, open Manage your OneDrive storage and choose what's taking up space. On a work or school account, select Storage used in the lower-left corner of OneDrive on the web and review the largest files. (Microsoft Support) If space is the real problem, OneDrive storage full covers what else counts against your quota.
Step 4: Compare before you delete
Open both files. For an Office file, open Version history on each to see which one was actually edited.
The limit: all four steps compare names and sizes, not contents. A contract saved as Acme_MSA_signed.pdf in one folder and scan_0043.pdf in another is the same file, and none of these steps will put them side by side.
Does OneDrive have a duplicate file finder?
No. As of October 2026, Microsoft's support pages describe no tool that lists duplicate files in OneDrive. What OneDrive does is prevent one kind of duplicate at upload time.
When you upload a file with the same name as one already in the folder, OneDrive asks: "Select Replace to replace the existing file, or select Keep both to rename the file you're uploading." (Microsoft Support) Keep both is how many duplicates start: the second copy gets a new name, and nothing links it to the first.
Copies with different names, copies in other folders, and copies that already exist are left alone.
Can Copilot find duplicate files in OneDrive?
Not as a feature Microsoft describes. Microsoft's Copilot in OneDrive pages don't mention duplicate files. Copilot can compare files you select, but "multiple file actions (such as summarization, comparison, Q&A) are currently limited to 5 files." (Microsoft Support FAQ)
As of October 2026, Microsoft says Copilot "can only be activated on the files that you select," that "folder Q&A is not currently supported," and that files must be under 150 MB. A getting-started page adds that you can "ask it to organize your files and folders to match your preferences," without saying it finds or removes duplicates, and that it's still rolling out. (Microsoft Support) It needs a Microsoft 365 Personal or Family subscription, or a work or school account with a Copilot license.
So Copilot can confirm a few files you already suspect. It doesn't scan a OneDrive for them.
How do you tell if two OneDrive files are identical?
Compare their content with a hash: a short code calculated from a file's bytes. Two files with the same hash are byte-for-byte identical, whatever they're called and wherever they sit.
Microsoft already stores one. Through Microsoft Graph, each file carries a quickXorHash, which Microsoft describes as "a proprietary hash of the file that can be used to determine if the contents of the file change," and "the only value that is guaranteed to be available for both OneDrive for work or school and OneDrive for home." (Microsoft Graph) It isn't shown in the OneDrive interface, but scripts and apps can read it.
That gives three ways to work at scale:
| Option | Matches by | Removes how | Undo |
|---|---|---|---|
| By hand | Name and size | You delete each file | Recycle Bin |
| A script (Microsoft Graph, PowerShell) | quickXorHash | Whatever you write | Only if you log it |
| An AI file agent | quickXorHash, plus look-alikes to review | Recycle Bin or a review folder, as one batch | Undo the whole batch |
Desktop duplicate finders can scan the synced OneDrive folder, but with Files On-Demand, online-only files aren't downloaded until you open them. (Microsoft Support) A tool that reads every file to hash it can end up downloading your whole OneDrive.
Does SharePoint have a duplicate finder?
No. SharePoint has no cleanup tool that lists duplicate files in a library. Two Microsoft features come close, and neither is for cleanup.
Search hides near-duplicates. In a SharePoint search center, near-duplicate files can be collapsed so only one shows in results. Microsoft's fix is to turn on the Show View Duplicates link in the Search Results web part, and notes this applies "only to the Search Center site." (Microsoft Learn) That reveals duplicates for one search, not for a library.
Purview eDiscovery finds duplicates for legal review. In Microsoft Purview, analytics on an eDiscovery review set count exact and near duplicates, and a "For Review" filter "filters out duplicate documents." (Microsoft Learn) It runs on documents collected into a case, for review. It doesn't delete anything in the library.
For a library cleanup, the options are the same as for OneDrive: by hand, a script reading the quickXorHash, or an agent. Some "duplicates" in a library are another team's working copy or the official record; official copy of record vs duplicate explains how to tell, and anything under a legal hold should be left alone.
How do you remove duplicates without deleting the wrong copy?
Settle the keep rule and the recovery plan before anything moves.
Decide which copy wins.
- Oldest is usually the original, and the one existing sharing links point to.
- The one in the most organized folder (the shallowest path, not a Downloads or backup folder) is the one people expect to find.
- Newest rarely means anything for identical files: nothing newer happened to the content.
Check the sharing. If the copy you remove is the one a client's link points to, that link stops working.
Know your recovery window. For personal accounts, Microsoft says you can restore files "deleted within the last 30 days." For work or school accounts, it's "the last 93 days," unless an administrator changed it. (Microsoft Support) In SharePoint, deleted items stay in the site Recycle Bin for 93 days, then in the second-stage bin for the rest of that period, and items deleted from the second-stage bin are purged immediately. (Microsoft Learn) Deleted files still count toward your storage until the Recycle Bin is emptied.
Version history doesn't cover a deleted copy. It keeps earlier versions of a file that still exists; Microsoft says "file version history is retained for 30 days," and a work administrator may have turned versioning off. (Microsoft Support) Check a copy for edits the other lacks before deleting it.
Move first, delete later. Move extras to a folder such as _Duplicates to review for a few weeks, then delete it. If a cleanup goes wrong anyway, undoing a bulk change in OneDrive covers Restore your OneDrive and what it rolls back.
How does The Drive AI find duplicates in OneDrive?
The Drive AI's file agent works inside a connected OneDrive or SharePoint library. You ask in plain English:
Find duplicate files in /Clients and keep the oldest copy of each.
- It matches by Microsoft's own hash. Files are grouped by the quickXorHash Microsoft reports, so only byte-identical files count. Groups are listed largest reclaimable space first, with how many files have no hash reported yet.
- It shows look-alikes separately. Files of the same type in the same folder whose sizes are a few bytes apart, such as a re-exported PDF, are listed to compare. They're never removed automatically, because their bytes differ.
- You choose the keep rule. Oldest, newest, shallowest folder or alphabetical. The other copies go to the Recycle Bin or to a folder you name.
- You approve one plan. The cleanup is shown as one change before anything moves, and can be undone as one change. You can also export the groups as a spreadsheet to review first.
The limits. Duplicates are matched within one source: a file in OneDrive isn't matched against its copy in a SharePoint library or in Dropbox. In OneDrive for work or school and SharePoint, undo can bring trashed files back once your Microsoft account, or your Microsoft 365 admin, allows SharePoint access; otherwise you restore them from the Recycle Bin on the web, and the agent tells you so. Work accounts need admin approval to connect, and connected drives come with the Max and Team plans. How the matching works across every source is in duplicate file detection, and the Google Drive version of this guide is how to find duplicate files in Google Drive.
Frequently Asked Questions
Does OneDrive automatically detect duplicate files?
Only at upload, and only by name. If you upload a file with the same name into the same folder, OneDrive asks you to Replace the existing file or Keep both, which renames the new one. It doesn't find copies with different names or in other folders, and Microsoft's pages describe no duplicate finder.
Can Copilot scan my OneDrive folders for duplicate files?
Microsoft's Copilot in OneDrive pages don't describe duplicate detection. Copilot can compare files you select, up to 5 at a time, and Microsoft says folder Q&A isn't currently supported. It can help confirm a few suspected copies, but it doesn't scan a whole OneDrive for duplicates.
Why does OneDrive keep creating duplicate files?
A common cause Microsoft documents is a sync problem that creates copies with your computer name added to the file name. Microsoft's fix is to remove the stored OneDrive credentials on Windows or Mac and restart OneDrive. Folder backup after a new computer and Keep both on upload are other common sources.
How long can I recover deleted OneDrive files?
Microsoft says personal accounts can restore files deleted within the last 30 days, and work or school accounts within the last 93 days unless an administrator changed the setting. In SharePoint, deleted items stay 93 days across the site and second-stage Recycle Bins. Deleted files count toward storage until removed.
Does deleting duplicates free up OneDrive storage right away?
Not until the Recycle Bin is emptied. Microsoft counts items in the Recycle Bin toward your storage on both personal and work accounts. Remove duplicates, confirm nothing is missing, then empty the Recycle Bin.
Most of the space sits in a few large files copied many times. Clear the biggest groups first, and move rather than delete. To do it as one request, ask The Drive AI with this, or paste it into Claude or ChatGPT with our connector added: Find duplicate files in my OneDrive. Keep the oldest copy of each and move the rest to the recycle bin, but show me what you would remove first.
Share it with your network
