How to Find and Remove OneDrive Duplicate Files
OneDrive has no duplicate finder. Here is how to spot likely copies, confirm exact duplicates by checksum, and remove them without losing the version you need.
Quick Answer
OneDrive has no built-in duplicate finder. To find OneDrive duplicate files, sort folders by name and size and search for your computer name to catch sync conflict copies. To confirm exact duplicates, make the folder available offline and compare SHA-256 hashes (PowerShell Get-FileHash on Windows, shasum on Mac), or run rclone dedupe list --by-hash onedrive:, which uses OneDrive's stored hashes and changes nothing.
Names and sizes are only hints. Two files called report.docx in different folders may hold different drafts, and a renamed copy can be byte-for-byte identical to the original. The checksum methods below compare file contents, so they find every exact copy no matter what it is called.
Why OneDrive Fills Up With Duplicates
- Sync conflicts. When a file changes on two devices before OneDrive syncs, it keeps both and adds the device name to one, such as
Budget-DESKTOP-4F2K.xlsx. These copies usually differ a little, so they need a closer look than true duplicates. - Camera backup. Phone photo backup can upload the same pictures again after a reinstall, a new phone, or a second backup app pointed at the same folder.
- Copying instead of moving. Dragging files into OneDrive while keeping the original in another synced folder, or restoring an old backup on top of a newer one, doubles whole folder trees.
- Known Folder Move and migrations. Turning on Desktop, Documents, and Pictures backup on a second PC, or moving files from another cloud, often brings the same files in twice under different paths.
Method 1: Sort and Search to Spot Likely Duplicates
This takes a few minutes and works in OneDrive on the web or in your synced folder in File Explorer or Finder.
- Find conflict copies. In File Explorer, open your OneDrive folder and search for your computer name (for example
DESKTOP-4F2K). Every result is a version OneDrive kept because of a conflict. - Find the big ones. Search
size:>100MBin the OneDrive folder, switch to Details view, and sort by Size. Duplicated videos, disk images, and ZIP backups sit next to each other with the same size. - Sort by name. In OneDrive on the web, switch to list view and sort by Name so similarly named files line up, then compare the size and modified date of each pair.
Same name and same size is a strong hint, not proof. To check a handful of suspect files, drop them into the free Find Duplicates tool. It checks up to 10 files (10 MB each) by SHA-256 in memory on our server, without storing them. For one pair, the Compare Files tool gives a plain identical or different answer.
Before Any Scan: Deal With Files On-Demand
OneDrive's Files On-Demand shows every file in your folder, but many are only placeholders until you open them (a cloud icon in the Status column). Any tool that reads file contents to compute a checksum makes OneDrive download each placeholder. On a large OneDrive that can mean hours of downloading and a full disk.
- Right-click the folder you want to clean and choose Always keep on this device. Wait until every file shows a solid green check.
- Clean one folder at a time (Pictures, then Documents) instead of scanning all of OneDrive at once.
- Or skip the download entirely with rclone (Method 4), which compares the hashes OneDrive already stores online.
Method 2: Find Exact Duplicates With PowerShell (Windows)
Windows sets the $env:OneDrive variable to your OneDrive folder. This script groups files by size first, so it only hashes files that could be duplicates, then lists every set of files with the same SHA-256 hash. It reads files and changes nothing.
# Change the path to scan one folder, e.g. "$env:OneDrive\Pictures"
Get-ChildItem "$env:OneDrive" -Recurse -File |
Group-Object Length | Where-Object Count -gt 1 |
ForEach-Object { $_.Group } |
Get-FileHash -Algorithm SHA256 |
Group-Object Hash | Where-Object Count -gt 1 |
ForEach-Object { $_.Group.Path; '' }Each block of paths separated by a blank line is one group of identical files. Add | Out-File duplicates.txt to the end to save the list. Work or school accounts use a folder named OneDrive - Company Name; $env:OneDriveCommercial points to it.
Method 3: Find Exact Duplicates With Terminal (Mac)
Current OneDrive versions on macOS keep files under ~/Library/CloudStorage, in a folder named OneDrive-Personal or OneDrive-CompanyName. This command hashes every file and prints the lines that share a hash, grouped together:
find ~/Library/CloudStorage/OneDrive-Personal -type f -exec shasum -a 256 {} + \
| sort \
| awk '{h=$1} h==p {if (!s) print l; print; s=1; next} {s=0; p=h; l=$0}'Each output line starts with the hash, so identical files appear one after another with the same 64 characters at the start. Replace the path with a subfolder to limit the scan. On Linux, where there is no official OneDrive client, use rclone instead.
Method 4: rclone dedupe --by-hash (No Download Needed)
rclone is a free, open-source command-line tool for Windows, Mac, and Linux. OneDrive stores a hash (QuickXorHash) for every file, and rclone can compare those hashes online without downloading anything. After connecting your account with rclone config (this guide assumes you named the remote onedrive):
# List files with identical content anywhere in OneDrive (changes nothing)
rclone dedupe list --by-hash onedrive:
# Limit the check to one folder
rclone dedupe list --by-hash "onedrive:Pictures/Camera Roll"--by-hash is what matters for OneDrive. Without it, dedupe looks only for files with the same name in the same folder, which OneDrive does not allow, so it finds nothing.
Always start with list mode
In its default interactive mode, rclone dedupe removes identical copies without asking. Start with list, and add --dry-run before any mode that deletes, such as rclone dedupe newest --by-hash --dry-run onedrive:.
Method 5: Use a Duplicate Finder App on the Synced Folder
If you would rather review duplicates in a window than read script output, point a duplicate finder that compares contents at the synced OneDrive folder (after making it available offline). Unlike Google Docs, Word, Excel, and PowerPoint files in OneDrive are real files on disk, so a checksum scan covers them too. One caveat: opening an Office file can change its internal metadata, so two copies of the same document may stop being exact duplicates even when the visible text matches.
FolderManifest is one option. It is a desktop app for Windows 10/11, macOS, and Linux that finds duplicates by exact SHA-256 content match, so renamed copies are caught and two different files are never grouped together. You review the duplicate groups as a plan, approve what is removed, and keep a record of what changed. Files are read on your computer and never uploaded. It does not find visually similar photos, such as edited or resized versions of the same picture; for those, use a similarity tool (our duplicate photo finder guide explains the difference).
How to Delete OneDrive Duplicates Safely
- Compare conflict copies, do not just delete them. A file with your computer name in it may hold edits the other copy lacks. Open both, or check them in the Compare Files tool.
- Check sharing first. A shared link points to one specific file. Keep the copy others use, and check the Shared view in OneDrive on the web before deleting work files.
- Keep the copy in the right folder, not just the oldest or newest one.
- Lean on the recycle bin. Deleted files stay 30 days for personal accounts and up to 93 days for work or school accounts. Empty it only once you are sure, because that is what frees the space.
Frequently Asked Questions
Does OneDrive have a duplicate file finder?
No. OneDrive on the web and the OneDrive desktop app have no feature that finds or removes duplicate files. You can spot likely duplicates by sorting folders by name and size, but confirming that two files are identical needs a checksum comparison, either on your computer or with a tool such as rclone.
Why does OneDrive create duplicate files with my computer name?
When the same file changes in two places before OneDrive can sync it, OneDrive keeps both versions and adds the device name to one of them, for example Budget-DESKTOP-4F2K.xlsx. These conflict copies often differ slightly, so compare them before deleting either one.
Will scanning my OneDrive folder download all my files?
It can. With Files On-Demand, many files exist only online until you open them. A tool that reads file contents to compute a checksum makes OneDrive download each one. To control this, right-click the folder you want to clean and choose "Always keep on this device" before scanning, or scan one folder at a time.
Can I find duplicate photos in OneDrive?
Exact copies, such as the same photo uploaded twice by camera backup, can be found by checksum like any other file. Edited, resized, or re-compressed versions of a photo are not exact copies and need a visual similarity tool instead.
Where do deleted OneDrive duplicates go?
To the OneDrive recycle bin. For personal Microsoft accounts, items are kept for 30 days; for work or school accounts, they are kept for up to 93 days across the first- and second-stage recycle bins. You can restore them during that time.
Is it safe to delete OneDrive duplicates from File Explorer or Finder?
Yes, as long as you know the copy is not the one others use. Deleting a file in your synced OneDrive folder deletes it from OneDrive everywhere and sends it to the recycle bin. Check sharing on work files first, because a shared link points to one specific copy.
Clean Up Your OneDrive Folder With Proof
Exact SHA-256 duplicate detection, a plan you review before anything is removed, and a record of what changed. Windows, Mac, and Linux. 7-day free trial, no card required, 30-day money-back guarantee.
