Tutorial
Stop SharePoint sync and fix OneDrive sync errors
How to stop syncing a SharePoint library in OneDrive on Windows and Mac, then fix sync errors in the right order, from file names to error codes and reset.
To stop syncing a SharePoint library, open the OneDrive settings, go to the Account tab, and select Stop sync next to the library. Files already downloaded stay on the PC, disconnected from SharePoint. Here is how to do it on Windows and Mac, the one thing you must never do, and how to troubleshoot a stuck sync in the right order, without losing files.
Stop syncing a SharePoint library
On Windows
- Select the OneDrive cloud icon in the taskbar. If you don't see it, use the Show hidden icons arrow.
- Select the Help & Settings gear, then Settings.
- Open the Account tab. Every synced library is listed there, under your organization's account.
- Select Stop sync next to the library, then confirm.
The folder stays in File Explorer, but it is no longer connected to SharePoint: your changes don't go up anymore, and your colleagues' changes don't come down.
On Mac
- Select the OneDrive icon in the menu bar.
- Open Help & Settings, then Preferences.
- On the Account tab, find the library and select Stop sync.
On a Mac, the folder sometimes stays in Finder after you stop syncing. It is no longer synced: you can delete it once the stop is confirmed.
Sync only part of the library
If the problem is the size of the library rather than syncing itself, keep it and shrink it: on the same Account tab, select Choose folders next to the library, and clear what you don't need on this PC.
What if it's a shortcut?
A folder added with Add shortcut to OneDrive doesn't appear in that list: it is part of your OneDrive. To remove it, right-click the shortcut in OneDrive and select Remove shortcut. The difference between the two is explained in Sync SharePoint with OneDrive or add a shortcut?
What happens to the files on the PC
- They stay in the local folder, disconnected from SharePoint. They are now plain copies that won't follow the team's changes anymore.
- "Online-only" files (blue cloud) are just placeholders: without sync, they no longer open. Only files that were already downloaded are really on the disk.
- Delete them by hand once the stop is confirmed. Otherwise outdated copies linger on the disk, and someone will end up working on one.
- If you sync again later, OneDrive creates a new folder. If the old one still has the same name, the new one gets a number ("Contoso 1"). Delete or rename the old one first.
Pause sync instead of stopping it
For a slow connection, a phone hotspot or a presentation, there is no need to stop anything: select the OneDrive icon, Help & Settings > Pause syncing, for 2, 8 or 24 hours. Nothing is disconnected, and OneDrive resumes on its own when the time is up (or with Resume syncing). Pausing applies to all of OneDrive, not to one library.
Troubleshoot a stuck sync
Most sync problems are fixed without reinstalling anything. Go in order, from the simplest step to the most drastic, and stop as soon as it works again.
1. Read the error message
A red cross on a file, or on the OneDrive icon, means there is a problem. Select the OneDrive icon in the taskbar: the list tells you which file is blocked and why. The rest of the library usually keeps syncing; one file in error doesn't block everything.
2. Fix the file
| What you see | The cause | The fix |
|---|---|---|
| "Invalid name" | Invalid characters " * : < > ? / \ |, or a reserved name (CON, PRN, AUX, NUL…) | Rename the file |
| "Path too long" | More than 400 characters on the SharePoint side, folders included | Shorten names or move the file up the folder tree |
| The file doesn't upload | It's open in an app that locks it | Close the app, sync resumes on its own |
A copy with the PC's name (Report-ACCOUNTING-PC.xlsx) | Conflict: the file was changed here and online at the same time | Compare both, keep the right version, delete the other |
| Padlock, changes rejected | Read-only permission, required checkout or required columns in the library | Ask for edit permission, or have required checkout turned off |
.tmp or ~$… files stuck | Temporary files from Office or another app | Delete them once no app is using them |
For conflicts in an Office file, just open the file: Office offers to merge, keep your version or save a copy. For other file types, OneDrive keeps both versions and adds the device name to yours.
3. Check the account and permissions
- The right account: in Settings > Account, the address shown must be the one of the organization that owns the library. A personal and a work account mixed up gives error
0x8004de8a. - Is the file online? Right-click the OneDrive icon, View online. If the library doesn't open in the browser, the problem isn't sync but access: permissions, account or network.
- Did someone check the file out? A file checked out by a colleague won't receive your changes until it is checked in.
4. Update OneDrive and Windows
OneDrive updates itself, but a PC that has been off for a long time, or held back by an IT policy, can run an old version. Install pending Windows updates, then restart OneDrive. Several error codes, such as 0x80070005 or 0x8004def1, come from an outdated version.
5. Stop syncing the library, then sync it again
If many files are in error and you don't want to handle them one by one, start over: stop syncing (see above), rename or delete the old local folder, then go back to the SharePoint library and select Sync again. OneDrive creates a clean folder from what is online.

Before deleting the old folder, check that it doesn't hold files edited offline and never uploaded: those only exist on the PC.
6. Unlink the PC, then reset OneDrive
The last resort, when nothing syncs anymore or OneDrive no longer starts properly.
Unlink this PC: Settings > Account > Unlink this PC, then sign in again. When asked for the location, keep the same folder (Use this folder) to avoid downloading everything again. Microsoft is clear on this: unlinking and relinking doesn't lose any data.
Reset OneDrive on Windows: press Windows + R, then paste the command:
%localappdata%\Microsoft\OneDrive\onedrive.exe /reset
If Windows can't find the file, try C:\Program Files\Microsoft OneDrive\onedrive.exe /reset, then C:\Program Files (x86)\Microsoft OneDrive\onedrive.exe /reset. Then start OneDrive again from the Start menu. On a Mac: quit OneDrive, then in Applications, Control-click OneDrive > Show Package Contents > Contents > Resources, and double-click ResetOneDriveApp.command.
Resetting doesn't delete any file, but it cuts every sync connection, SharePoint libraries included. OneDrive runs a full sync, and you have to sync the libraries again and choose the folders again if you only synced part of them. Write them down first.
The most common error codes
| Code | What it means | What to do |
|---|---|---|
0x8004de40 | OneDrive can't reach the cloud | Check the connection, the company proxy or firewall |
0x8004de8a | Missing account, or personal and work accounts mixed up | Check the account in Settings > Account |
0x8004de90 | OneDrive isn't fully set up | Start OneDrive and finish signing in |
0x8004def7 | Storage exceeded, or account suspended | Free up space or contact IT |
0x80070005 | A problem with OneDrive updates | Install Windows updates, then the OneDrive update |
0x8007016a | A problem with Files On-Demand | Update Windows, turn Files On-Demand off and on again, reset OneDrive |
The full list is on Microsoft's page What do the OneDrive error codes mean?.
For admins: when the Sync button is missing
If the Sync button is missing in a library, or OneDrive says "Options set for this library by your administrator prohibit users from syncing it", it is a setting, not a failure:
- For a library: Library settings > Advanced settings > Offline and sync. "Allow people to sync this document library to their computers with Microsoft OneDrive and access it offline?" must be set to Yes.
- For a whole site: Site settings > Search and offline availability > Offline Client Availability.
- For the tenant: the SharePoint admin center, Settings > Sync. It can hide the Sync button, restrict sync to computers joined to specific domains, and block the upload of specific file types.

These options exist precisely to keep sensitive libraries from being synced. Check that they were not turned off on purpose before opening them up.
What I recommend you do
- Teach your teams the right move: Settings > Account > Stop sync, never deleting the folder.
- Have people read the error message before calling support: the cause is almost always written there.
- Sync folders, not whole libraries, with short folder trees: that is what prevents long paths and slowdowns.
- Keep the reset for last, after writing down which libraries are synced.
- Prefer the shortcut when you can: it is removed in one click and follows the user on every device.
Sync, shortcuts and the right reflexes when an error shows up are part of the training Become self-sufficient on SharePoint, day to day. And if you're planning to move a network drive to SharePoint, that's the kind of project I support through consulting.
- OneDrive
- SharePoint
- Sync
- Troubleshooting
Sources
- Microsoft Support — Sync SharePoint and Teams files with your computer
- Microsoft Support — Fix OneDrive sync problems (work or school)
- Microsoft Support — Reset OneDrive
- Microsoft Support — What do the OneDrive error codes mean?
- Microsoft Learn — Resolve sync issues in OneDrive for work or school
- Microsoft Support — Restrictions and limitations in OneDrive and SharePoint
Share this article
Know a colleague or client who deals with this? Send them the article in one click.
Read next
Comments
Loading comments…