Skip to main content

How to stop sync of a SharePoint Document Library

“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!

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)
  2. From the pop-up that appears, click on More
  3. From another pop-up that appears, choose Settingsstop 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 buttonstop 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.

You may also like

How many document libraries shall I have in a SharePoint Site?

July 31st, 2019

You may also like

How to convert an employee handbook to SharePoint library with metadata

July 16th, 2019

You may also like

How to add a Unique Identifier to a SharePoint list or library

July 3rd, 2019

Need SharePoint Help?

Hourly consulting, training and configuration services are available

Learn More