Skip to main content
< All Articles

How to stop sync of a SharePoint Document Library

Posted on March 5, 2019
SharePoint

“Help! We just had all our files and folders mysteriously disappear from our SharePoint site. They were there yesterday, and today they are all gone. We lost like 10,000+ files and folders.” This is the email I got from one of my clients the other day. If this sounds familiar, you might want to read this article.

Usually, when something like this happens, it is either one of the two choices:
  1. You have a disgruntled employee who went on a mass deletion spree
  2. You have an employee who deleted folders on a synchronized document library

It is usually the latter. Let me explain what is happening here.

When the user synchronizes a SharePoint Document library via OneDrive sync client, the whole library of files and folders is copied over to the user’s computer. But it is not just copied. A 2-way link is established between the user’s computer and SharePoint. Any changes in one place are instantly taking place in another (hey, that’s the whole purpose of sync). So if the user or someone else modifies something in SharePoint – the change is instantly replicated to the user’s synchronized files. It works the other way as well – if the user modifies a document by opening it up on the computer, the change instantly takes place in SharePoint as well. That’s just how it works!

Howtostopsyncsharepointdoclibrary7

Now, any changes mean any changes. So if the user deletes a file and folder in one place, it is instantly deleted in another. So what happens usually is that users sync document libraries, then decide to “clean up space” on their computer by simply deleting files and folders on the computer by pressing the delete button. Without any warning messages, files and folders are sent to the user’s Recycle Bin. So that is exactly what happened with my client – a user did just that, and 10,000+ department files and folders got deleted.

How to un-sync a SharePoint Document Library

So, how do we prevent this disaster? Very easy – you have to stop sync first and then delete your files and folders. Here is what you got to do:

  1. Click on a little blue cloud icon in your computer’s taskbar (that’s how you access OneDrive for Business on your computer) Howtostopsyncsharepointdoclibrary1
  2. From the pop-up that appears, click on More Howtostopsyncsharepointdoclibrary2
  3. From another pop-up that appears, choose Settings stop sync of a SharePoint Document Library
  4. On the next screen, you will see a list of all the places you synchronize. Most likely you will see your own OneDrive being synchronized, plus any SharePoint document libraries you pressed sync on. To un-sync, just click on Stop Sync next to the location you want to stop synchronizing (in my case a Document Library on a Sales Site) stop sync of a SharePoint Document Library
  5. You will then get a confirmation message; just press Stop Sync button stop sync of a SharePoint Document Library
  6. The press OK – you are all set. You will see the green checkbox (that you normally see appear over the yellow folder) gone – meaning there is no more synchronization in place and no link between SharePoint document library and your computer. You can now press a delete button without fear of wiping out content from a SharePoint site :)

How to restore files and folders already deleted

If you read this post after someone deleted the files, you can do one of two things:

  1. Ask the user to go to their Recycle Bin and restore it themselves
  2. If you are a Site Collection Admin, you can restore on their behalf

I describe both options in this post.

About Me

I’m Greg Zelfond, a U.S. based SharePoint consultant, and I provide affordable out-of-the-box SharePoint consulting, training, and configuration assistance to small and medium-sized businesses all over the world.

Need help?