How to Disable OneDrive in Windows 11 Without Losing Files

Mudin Saiful

A sleepy cloud kept inside a closed jar, illustrating how to disable OneDrive in Windows 11 without losing files

Tested on Windows 11 version 26H2 (OS Build 26300.9457), Pro edition, with a local account.

OneDrive is handy when you want your documents on every device, or when your laptop dies and you need last week’s report from the cloud. There are times when you just don’t want it, though. You turn on a new PC, and suddenly your Desktop has little cloud icons on it, a “Back up your folders” window keeps popping up, and OneDrive starts with Windows every single time even if you never signed in. Even worse, a lot of people disable it the wrong way and end up thinking their files are gone.

In this article, we’ll cover how to disable OneDrive in Windows 11 without losing files. We’ll start by checking where your files really live, then go from the gentle options (quit, stop it at startup, unlink) to the stronger ones (uninstall and Group Policy). I tried every method on a real Windows 11 PC, and I’ll tell you exactly what happened on my screen, including one registry trick that didn’t stick.

Before You Turn Off OneDrive: Where Are Your Files?

This is the part most guides skip, and it’s the only part that can cost you files. OneDrive can do two things on your PC. It can sync its own “OneDrive” folder, and it can also back up your Desktop, Documents and Pictures by moving them inside that OneDrive folder. Microsoft calls this folder backup (the older name is Known Folder Move). If that’s on, your Desktop isn’t at C:\Users\yourname\Desktop anymore, it’s at C:\Users\yourname\OneDrive\Desktop.

The second thing to know is Files On-Demand. OneDrive can keep a file “online only”, which means you see the file name but the actual content is still in the cloud. According to Microsoft, those files show a blue cloud icon and can’t be opened without an internet connection. A solid green circle with a white check mark means “Always keep on this device”, so the file is really on your disk. If you unlink or remove OneDrive while some files are online only, the content of those files is not on your PC. It’s still safe on OneDrive.com, but it’s not on your disk. So before anything else, here’s what you do:

Check whether OneDrive is installed and running

Checking that OneDrive is installed and running in Windows 11 with PowerShell and winget

Press Windows + R, type powershell and press Enter. Then run the two commands below. The first one shows if OneDrive is running and from which folder (number 1). The second one shows the installed version (number 2). On my PC OneDrive was running from AppData\Local\Microsoft\OneDrive, version 26.212.1029.0006, which is the normal per user install that comes with Windows 11.

Get-Process OneDrive | Format-Table Name,Path -AutoSize
winget list onedrive

Check where Desktop, Documents and Pictures point to

Checking that Desktop, Documents and Pictures are still local folders before turning off OneDrive in Windows 11

Next, run the command below. It reads where Windows thinks your main folders are. If the paths look like C:\Users\yourname\Desktop (number 1), your folders are local and OneDrive isn’t backing them up. If you see \OneDrive\ in the middle of the path, folder backup is on, and you need to bring those files home first (covered in the next section).

Get-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" | Select-Object Desktop,Personal,"My Pictures" | Format-List

Note: “Personal” is the internal name for the Documents folder. Don’t worry if you see %USERPROFILE% instead of the full path, that’s the same thing as C:\Users\yourname.

In my case all three folders were local, and the PC used a local account without a Microsoft account, so OneDrive was installed and running but not signed in. That’s a common situation on PCs set up offline, and it’s also why some steps below look different from screenshots you may have seen elsewhere.

How to Bring Your Files Back Before Disabling OneDrive

If the check above showed \OneDrive\ in your folder paths, don’t uninstall anything yet. You first want every file to be a real local copy. Otherwise you could end up with a Desktop full of names that won’t open.

I couldn’t test this section on my PC because my folders were already local and I didn’t use a Microsoft account. So the steps here are taken from Microsoft Support and the Microsoft Q&A answers, not from my own screen. The process has several steps:

First, click the OneDrive cloud icon in the taskbar, then the gear icon, and go to “Settings”.

In “Sync and backup”, open “Advanced settings” and click on “Download all files” under Files On-Demand. Microsoft says this is the same as the old option of turning Files On-Demand off, so every file gets downloaded and takes real disk space. Make sure you have enough free space first.

Next, wait until the files in your OneDrive folder show the solid green check mark instead of the blue cloud. With a big library this can take hours.

The next phase is to go back to “Sync and backup” and click on “Manage backup”. Turn off each folder (Desktop, Documents, Pictures and so on) and click on “Stop backup”. Windows asks where you want the files. Pick the option to keep the files only on your PC. Microsoft notes that if some files are still online only, you’ll get a message asking you to set them to “Always keep on this device” first.

Finally, open File Explorer and check that your Desktop and Documents folders really have your files. If any were left in C:\Users\yourname\OneDrive\Desktop, move them back to C:\Users\yourname\Desktop yourself.

Warning: Don’t delete anything from OneDrive.com while you’re doing this. Unlinking and uninstalling never delete your cloud files, but deleting them on the website does, and that deletion syncs to every device still connected.

After that, run the folder check command from the first section again. Hopefully, all three paths now point to your local folders, and you’re safe to disable OneDrive any way you like.

How to Quit OneDrive or Pause Syncing for a While

If you only want OneDrive quiet for an afternoon, you don’t need to remove anything. Quitting closes the app until you open it again or restart the PC. Pausing keeps it running but stops uploads and downloads for 2, 8 or 24 hours.

Pausing only appears when you’re signed in with an account. On my PC, which wasn’t signed in, the menu only had three items. Here’s how that should go:

Quit OneDrive from the taskbar

The OneDrive gear menu in the Windows 11 taskbar with the Quit OneDrive option

Click on the OneDrive cloud icon in the bottom right corner of the taskbar (it may be hidden behind the small arrow). From there, click on the gear icon (number 1) followed by “Quit OneDrive” (number 2). If you’re signed in, you’ll also see “Pause syncing” in the same menu with the 2, 8 and 24 hours choices.

As always, quitting is only temporary. The next time you sign in to Windows, OneDrive comes back, which is why the next section matters more.

How to Stop OneDrive from Starting at Sign In

This is the method I’d suggest for most people who simply don’t use OneDrive. Nothing gets uninstalled, nothing gets unlinked, your files stay exactly where they are. OneDrive just doesn’t start when you sign in to Windows.

You can do it from Settings or from Task Manager. I tried both, and they turned out to be the same switch, so pick whichever you like. Here’s what you do:

Turn off OneDrive in Startup apps

Turning off Microsoft OneDrive in Startup apps in Windows 11 Settings

Press Windows + I to open Settings and go to “Apps”, then click on “Startup”. Find “Microsoft OneDrive” and switch it to “Off” (number 1). The label under it changed from “High impact” to “No impact” right away on my PC.

Or disable it in Task Manager

Disabling OneDrive in the Startup apps page of Task Manager in Windows 11

Press Ctrl + Shift + Esc to open Task Manager and click on “Startup apps” on the left. Select “OneDrive” (number 1) and click on “Disable” at the top (number 2). The status changes to “Disabled”.

My experience: I switched OneDrive off in Settings first, then opened Task Manager to do it “properly”, and it already said “Disabled”. Both screens read and write the same startup entry. So if you already did one of them, you don’t need the other.

Make sure to restart your computer. Then check the taskbar again. The OneDrive cloud icon shouldn’t be there anymore until you open OneDrive yourself from the Start menu.

How to Unlink OneDrive from This PC

Unlinking disconnects your account from this computer. OneDrive stops syncing, and the files that were fully downloaded stay in your OneDrive folder as normal local files. Microsoft says you won’t lose files or data by unlinking, since everything is still on OneDrive.com. Files that were online only, though, don’t come along, so do the “Download all files” step above first if you care about them.

My test PC had no Microsoft account signed in to OneDrive, and I didn’t sign in with a personal account just for this, so I could only check where the option lives. I didn’t run the unlink itself. Here’s how that should go:

Open the Account tab in OneDrive settings

Where to find Unlink this PC on the Account tab of OneDrive settings in Windows 11

Click on the OneDrive cloud icon, then the gear icon, and choose “Settings”. Go to “Account” (number 1). You’ll see “Unlink this PC” under your account name (number 2). When you’re signed in, clicking it opens a confirmation, and you click on “Unlink account” to finish.

After unlinking, OneDrive shows the sign in screen again. If you don’t want that screen on every boot, combine this with the startup switch from the previous section, or move on to uninstalling.

How to Uninstall OneDrive in Windows 11

On Windows 11 OneDrive is a normal app that you can uninstall, at least in the version I tested. Uninstalling removes the program and unlinks the account, but it does not delete your local OneDrive folder or anything in the cloud. That’s actually what I wanted to confirm on my PC, and it held up.

There are two ways to do it: Settings, or the OneDriveSetup.exe command if you like the terminal. I’ll show Settings first. The process has several steps:

Find OneDrive in Installed apps

Uninstalling Microsoft OneDrive from Installed apps in Windows 11 Settings

Go to “Settings”, then “Apps” and “Installed apps”. Type onedrive in the search box. Click on the three dots next to “Microsoft OneDrive” (number 1) followed by “Uninstall” (number 2). “Modify” was greyed out on my PC, which is normal for OneDrive.

Confirm the uninstall

Confirming the OneDrive uninstall in Windows 11

A small box says “This app and its related info will be uninstalled.” Click on “Uninstall” (number 1). After a few moments you will see a User Account Control window from Microsoft. Click “Yes”. On my PC the whole thing took about 15 seconds, and the OneDrive icon disappeared from the taskbar.

Check what was left behind

The OneDrive folder is kept and OneDriveSetup stays in System32 after you uninstall OneDrive in Windows 11

I ran the command below to see what really changed. OneDrive wasn’t running anymore and OneDrive.exe was gone. The OneDrive folder in my user profile was still there (number 1), which means any local files inside it are safe. And OneDriveSetup.exe was still in System32 (number 2), so Windows keeps an installer around in case you want OneDrive back.

"OneDrive running: " + [bool](Get-Process OneDrive -EA 0)
"OneDrive folder kept: " + (Test-Path $env:USERPROFILE\OneDrive)
"OneDrive.exe present: " + (Test-Path $env:LOCALAPPDATA\Microsoft\OneDrive\OneDrive.exe)
"Installer in System32: " + (Test-Path C:\Windows\System32\OneDriveSetup.exe)

If you prefer a command, OneDriveSetup.exe can also uninstall OneDrive. I used it later in this test, after reinstalling OneDrive, and it worked without any window or prompt. Run it in PowerShell, then give it about 20 seconds:

C:\Windows\System32\OneDriveSetup.exe /uninstall
Result of uninstalling OneDrive in Windows 11 with OneDriveSetup.exe /uninstall

Afterwards, the check returned “OneDrive.exe present: False” (number 1), and winget no longer listed “Microsoft OneDrive”.

Note: Some people report an empty OneDrive entry staying in the File Explorer sidebar after uninstalling. The Group Policy further down hides that entry, as you’ll see in my screenshot.

How to Reinstall OneDrive If You Change Your Mind

It’s also advisable to know the way back before you remove something. Fortunately, putting OneDrive back is super easy, and you don’t need a Microsoft account to install it. You only sign in later if you actually want to sync.

I reinstalled it with winget, the package manager that’s built into Windows 11. Here’s what you do:

Install OneDrive with winget

Reinstalling OneDrive in Windows 11 with the winget install command

Open PowerShell and run the command below. winget found “Microsoft OneDrive” (number 1), downloaded about 128 MB from Microsoft and finished with “Successfully installed” (number 2). It took a bit over two minutes on my connection.

winget install --id Microsoft.OneDrive -e --source winget

If you don’t have internet or winget acts up, double click C:\Windows\System32\OneDriveSetup.exe instead. That’s the installer we saw survive the uninstall above. On my PC, OneDrive didn’t open by itself right after winget finished. You can start it from the Start menu and sign in when you’re ready. If you only want it installed and not running, check “Startup apps” again and keep it “Off”.

How to Disable OneDrive Using Group Policy or the Registry

The Group Policy method is the strongest option. OneDrive stays installed, but Windows refuses to let it work. It’s useful when you share the PC, when an update keeps bringing OneDrive back, or when you’re setting up computers for someone else. The Local Group Policy Editor (gpedit.msc) only exists on Windows 11 Pro, Enterprise and Education. If you’re on Home, skip to the registry command at the end of this section.

The policy is called “Prevent the usage of OneDrive for file storage”. According to its own description, users can’t open OneDrive, OneDrive files aren’t kept in sync, and OneDrive disappears from the File Explorer navigation pane. The process has several steps:

Open the OneDrive policies

The Prevent the usage of OneDrive for file storage policy in the Windows 11 Local Group Policy Editor

Press Windows + R, type gpedit.msc and press Enter. Go to “Computer Configuration”, “Administrative Templates”, “Windows Components” and click on “OneDrive” (number 1). Double click “Prevent the usage of OneDrive for file storage” (number 2). Don’t confuse it with the “on Windows 8.1” policy right below it, which is for old systems.

Enable the policy

Enabling the policy that disables OneDrive in Windows 11 with gpedit

Select “Enabled” (number 1) and click on “OK” (number 2). There are no extra options to fill in. If you want OneDrive back later, you’ll come back to this window and choose “Not Configured”.

Apply and test it

The DisableFileSyncNGSC registry value is set and OneDrive can no longer run in Windows 11

Run gpupdate /force in PowerShell to apply the policy right away. Then check the registry. The policy creates DisableFileSyncNGSC with value 1 under HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive (number 1). To test it, I started OneDrive.exe directly (number 2). The file exists, Test-Path says “True” (number 3), but Get-Process shows nothing. OneDrive opened and closed itself immediately, and no cloud icon appeared.

gpupdate /force
reg query HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive

Check File Explorer

OneDrive removed from the File Explorer navigation pane in Windows 11 after the policy is applied

Open File Explorer. The OneDrive entry that used to sit above “Desktop” in the sidebar is gone (number 1). Your Desktop, Documents and the other folders stay where they are, and Quick access shows them as “Stored locally”.

On Windows 11 Home, you can create the same value with one command in PowerShell as administrator, then restart. This is exactly the value the Pro policy wrote on my PC:

reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive /v DisableFileSyncNGSC /t REG_DWORD /d 1 /f

To undo it, the method depends on how you set it. Here’s the part that tripped me up:

Deleting the registry value didn’t undo the policy

DisableFileSyncNGSC comes back after reg delete because the OneDrive gpedit policy is still enabled

I tried to turn the policy off by deleting DisableFileSyncNGSC with reg delete and ran gpupdate /force. The value came straight back with 0x1 (number 1). That’s because gpedit keeps its own copy of the policy and writes it to the registry again on every refresh.

My experience: I honestly expected reg delete to be enough, since that’s the advice in a lot of forum posts. It only works if you created the value with reg add in the first place. If you used gpedit, the registry is just a mirror and gpedit wins every time.

Set the policy back to Not Configured

Setting the OneDrive policy back to Not configured in gpedit on Windows 11

So I opened gpedit.msc again, went back to the same policy and chose “Not Configured”. The state column shows “Not configured” (number 1). After gpupdate /force, reg query finally said “The system was unable to find the specified registry key or value”, which means the block is gone. If you used the reg add command on Home, run the reg delete command below instead.

reg delete HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive /v DisableFileSyncNGSC /f

Common Problems When Disabling OneDrive

My Desktop files are gone after turning off OneDrive

Usually they’re not gone, they’re just in another folder. Look in C:\Users\yourname\OneDrive\Desktop. If the files there show a blue cloud icon, they’re online only, so sign in to OneDrive.com with the same account and download them. This is exactly why the “Download all files” step comes first.

There’s no “Pause syncing” in the OneDrive menu

Pause only shows up when OneDrive is signed in to an account. On my PC, which wasn’t signed in, the gear menu only had “Settings”, “Get help” and “Quit OneDrive”. If you’re not signed in, there’s nothing syncing anyway, so just turn it off in “Startup apps”.

winget asks to agree to msstore terms

When I ran winget list without a source, it stopped and asked me to agree to the Microsoft Store source terms. You don’t need that source for OneDrive. Answer N, then add –source winget to the command, like in the install command above.

A “Photos” entry from OneDrive showed up

After reinstalling OneDrive with winget and uninstalling it again with OneDriveSetup.exe, winget list still showed a “Photos” entry with an OneDrive ID. It wasn’t in the list before the reinstall, so it came with the newer installer as a separate entry. OneDrive.exe itself was gone and no cloud icon was running. If you want that entry gone too, check “Installed apps” for it.

OneDrive comes back after a Windows update

Feature updates and new user profiles can install OneDrive again. If that keeps happening, the Group Policy (or the DisableFileSyncNGSC value on Home) is the reliable fix, because it stops OneDrive from working even when it’s installed.

This concludes how to disable OneDrive in Windows 11 without losing files, from checking your folders and quitting it, to the startup switch, uninstalling and the Group Policy block. Next, you would probably want to clean up other built in extras too, and my guide on how to remove Copilot from Windows 11 uses a similar mix of Settings and PowerShell. Since several commands above need admin rights, it helps to know how to open CMD as administrator on Windows 11, and if Windows starts acting up after all the tweaking, you can repair Windows 11 without reinstalling with SFC and DISM. If OneDrive still won’t let go on your PC, write the exact message in the comments and I’ll take a look.

Leave a Comment