Latest updates to Windows 11 has deeply integrated OneDrive underneath the awareness of users. Other than the persistent nag screens telling users to subscribe to Office 365, it maliciously reshuffled the link structure of our dearly beloved File Explorer. Remember the requirement to login with a Microsoft Account? That is a key step to mask all known user links to that of OneDrive; it makes sure that your files are controlled by Microsoft before you can consent with it. Some users even reported that their files were moved to OneDrive without their notice.
There are a lot of tools out there that can help you debloat Windows 11. My preferred tool is the ReviOS playbook for the AME wizard. But out of instinct you may have removed OneDrive from your system. And now multiple errors are being thrown out everywhere. File Explorer throws an error. Powershell throws an error. And some third-party apps may even throw an error.
In this scenario, I will help you untangle OneDrive from File Explorer. But bear with me for a bit, you may have to tolerate and exit the error prompts for missing OneDrive folders. As long as you can load the File Explorer after these error prompts you may proceed.
Step 0.1: Make sure that you can actually load File Explorer.
What icons you see on the Start Menu and on the taskbar are shortcuts. And these shortcuts actually load up a directory in OneDrive by default. Like the This PC location shown in some folder options actually load up the user Desktop folder, which as of recent is mapped to the OneDrive folder. The Desktop folder is a key folder for a lot of GUI experiences in Windows, such as Desktop shortcuts and sidebar navigation in file managers.
Nonetheless, there is a chance that deleting OneDrive will break these shortcuts further that you can’t get File Explorer to run from known locations, such as the Taskbar and the App List. If these shortcuts refuse to load after error prompts for broken OneDrive links, you may have to load explorer.exe from the Run prompt with Window key+R.
Step 0.2: Validate the presence of your files
You need to make sure that your files are locally present and not linked to OneDrive. If they are locally present, you may have to backup them out of your user folder and into a separate drive or folder. This is not necessary for the most part, but it is safe practice in case you accidentally permanently deleted files on the process of untangling OneDrive out of File Explorer. The permanent deletion prompt, from experience, is triggered when the files are sometimes too large for the Recycle Bin or the file names are way too long. I may be wrong on that one, but I had that prompt show upon me at times when deleting files. So do so.
If your files are instead linked to OneDrive (they are showing as shortcut icons instead), you may have to double check their existence in the web client in the onedrive.com. If there are there, you may download them from there. You may do so before or after this tutorial; these steps are just to make sure you can retrieve your files after.
Step 1: Remove all your Quick Links and Shortcuts on the sidebar
If you managed to load your File Explorer, you have to delete the preloaded shortcuts from your Quick Access. Just Right Click >> Unpin Quick Access link. These links are mapped to the OneDrive folder. You have to rebuild your preferred quick access links manually afterwards.
Step 2: Take ownership of the OneDrive folder on your user space, if necessary
Navigate to your user folder. Right click on the OneDrive folder. If there is a Take Ownership option, click it, enter your password if prompted. There is a chance that the Take Ownership is shown in the legacy context menu instead of the revamped one so you may want to check that.
This is only in case if the methods below (such as the eventual deletion of the OneDrive Folder) requires escalated user privileges. If there is no Take Ownership option, it is probably not necessary. Step 3: Move key folders out of the OneDrive folder
Now, there are 3 key folders that must be unset:
C:\Users\yourdesktopusername\Desktop C:\Users\yourdesktopusername\Documents C:\Users\yourdesktopusername\Pictures
Right click these folders to validate that these map to the OneDrive folder. What is nefarious is that they are not registering as shortcuts. Deleting your OneDrive folder for good will cause a lot of native apps that rely on these folders to misbehave. That is how misleading and malicious the OneDrive integration has become.
You can always just keep the OneDrive folder sitting still, undeleted.
But it is better to do the following:
Navigate to the OneDrive folder.
Right click on the Desktop folder inside the OneDrive folder.
Go to the location tab to change location.
Click the button that will show a tree view of your file system directory. For convention, navigate to C:\Users\yourdesktopusername. Make a folder here namedC:\Users\yourdesktopusername\Desktop` and use this as your new location. Along the process you may find that you now have two Desktop folders on your user folder. This is fine; the folder path is what is critical in this process.
Exit and reopen File Explorer. Now your Desktop folder is unlinked from OneDrive.
The same thing will go for Pictures.
Navigate to the OneDrive folder.
Right click on the Pictures folder inside the OneDrive folder.
Go to the location tab to change location.
Click the button that will show a tree view of your file system directory. For convention, navigate to C:\Users\yourdesktopusername. Make a folder here named C:\Users\yourdesktopusername\Pictures and use this as your new location. Along the process you may find that you now have two Pictures folders on your user folder. This is fine; the folder path is what is critical in this process.
Exit and reopen File Explorer. Now your Desktop folder is unlinked from OneDrive.
The same process will go for the Documents folder, only that there are actually two Documents folder beforehand. This is because the original Document folder is kept for some legacy apps.
Navigate to the OneDrive folder.
Right click on the Documents folder inside the OneDrive folder.
Go to the location tab to change location.
Click the button that will show a tree view of your file system directory. For convention, navigate to C:\Users\yourdesktopusername. If there are two Documents folder, select the ones that has a shorter-width inner icon. If this happens to confuse you further (because the icons can be confusing), exit the tree view prompt instead, and manually type the path of your new Documents folder C:\Users\yourdesktopusername\Documents. Again, the path is what is critical here.
Exit and reopen File Explorer. Now your Pictures folder is unlinked from OneDrive.
After doing this, a lot of the missing OneDrive folder error prompts should disappear. You might even be able to easily open the File Explorer from the Start Menu.
However, your File Explorer icon in the desktop taskbar is still broken. Because that is a shortcut in a folder that requires ownership. Let’s fix that.
Step 4: Take Ownership of the Pinned Items on your TaskBar
If you notice, you cannot remove the shortcut to the Pinned Items right away. It is because the folder that stores these shortcuts are actually stored in C:\Users\yourdesktopusername\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar. Navigate to that directory, take ownership of the folder, and delete the Explorer link there. You may relink the File Explorer afterwards by searching for File Explorer in the Start Menu search box, right click and then Pin to Taskbar.
Step 5: Purge OneDrive once and for all.
From my experience, the settings above are the only ones that are deeply affected by OneDrive, but this only applies to a freshly installed and freshly debloated Windows 11 laptop. Not so much by those whose files were surprisingly shuffled and held hostage by OneDrive. Thus while the following actions are not guaranteed, these are what I would likely would have done.
- Take ownership of the
C:\Users\yourdesktopusername\OneDrivefolder. - Validate that the files in
C:\Users\yourdesktopusername\OneDriveare not shortcuts. - Check that your Document and Desktop files already exist in
C:\Users\yourdesktopusername\DocumentsandC:\Users\yourdesktopusername\Desktoprespectively. - If locally stored files are still present in OneDrive, move them out of the folder.
- If all your files are now turned to links, they are likely stored in the OneDrive web app. Check your files in the OneDrive in the browser.
- Delete all remaining shortcuts in the OneDrive folder.
- Delete the
C:\Users\yourdesktopusername\OneDrive.
And there you have it. From my experience, these steps, coupled with a debloater tool or an accidentally deleted OneDrive (if you are able), should give you a OneDrive-free operating system. Which should last as long as Microsoft feature updates allow it too. Them updates you have to be cautious about sadly, as Microsoft will continue to find a way to sell you a subscription.