Windows 11 integrates Microsoft OneDrive extremely deep within the operating system. By default, the service tends to redirect crucial personal folders such as Documents, Desktops and Images directly to the cloud. Although this feature ensures continuous backup, many users prefer to maintain local control over their files to avoid synchronization problems, unwanted doubles or free cloud space exhaustion.
In this technical guide, we will analyze steps to completely uninstall OneDrive from Windows 11, restore the original pathways of system folders and prevent the software from being automatically reinstalled via Windows Update.
Preliminary operations: Attention to Only Cloud Files
Warning: Before proceeding with removal, it is imperative to check the status of your files. If the “File on request” function is activated, some documents may only exist on Microsoft servers and not on the local hard drive.
- Open the OneDrive folder via File Explorer.
- Make sure all important files have the icon of a green check mark (which indicates the local presence) and not the icon of a cloud.
- If you see the cloud icon, right click the files or folders and select “Always keep on this device”.
- Make a preventive backup of Documents, Desktops and Images folders on an external drive.
Step 1: OneDrive Process Interruption
Before proceeding with uninstallation, you must end any activity in the background linked to the service.
- Right-click the OneDrive icon in the notification area (low right) and select the option to close the application.
- Press
Ctrl + Shift + Escto open the door Management. - Locate the process OneDrive. ex, right click and select End of activity.
- Move to the tab Startup app, locate Microsoft OneDrive, right click and select Disabled.
Step 2: Uninstall the Software
The cleanest way to remove the client is to use PowerShell with administrator privileges.
- Click on the Start menu, type
PowerShell, right click the result and select Run as administrator. - Type the following command to use the Windows package manager and press Enter:
PowerShell
winget uninstall "Microsoft OneDrive"
Alternatively, you can force the uninstall executable integrated into the system:
PowerShell
& "$env:SystemRoot\System32\OneDriveSetup.exe" /uninstall
Step 3: Restoration of Local Paths in the System Registry
Now that the software has been removed, the operating system may still search for user folders within the OneDrive path (e.g. C:\Utenti\TuoNome\OneDrive\Documenti). You need to redirect these directories to their standard local routes.
Always from the PowerShell window as administrator, run these three commands in sequence to correct the relevant registry keys:
PowerShell
# Fix Documents
Set-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" Personal "$env:USERPROFILE\Documents"
# Fix Desktop
Set-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" Desktop "$env:USERPROFILE\Desktop"
# Fix Pictures
Set-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My Pictures" "$env:USERPROFILE\Pictures"
At this point, you can manually move your files from the old residual OneDrive folder to the new local folders you just restored.
Step 4: Block Automatic Reinstallation
Windows Update tends to restore OneDrive during major update. To prevent this from happening, we can set a block rule through the registry.
Run this command in PowerShell (always as administrator):
PowerShell
reg add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v DisableFileSync /t REG_DWORD /d 1 /f
Note: If you use Windows 11 Pro or Enterprise, you can get the same result through the Group Policy Editor (gpedit.msc), navigating in Computer Configuration > Administrative Templates > Windows Components > OneDrive and enabling the voice relative to the prevention of use of OneDrive for file storage.
Step 5: File Explorer Cleaning
To delete the persistent OneDrive icon from the Explorer File sidebar, use these commands to remove its CLSID keys:
PowerShell
Remove-Item "Registry::HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "Registry::HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" -Recurse -Force -ErrorAction SilentlyContinue
Finally, restart the Windows Explorer process to apply all visual changes:
PowerShell
Stop-Process -Name explorer -Force
After completing these steps and restarting your computer, your Windows 11 system will be completely free from OneDrive. Your personal folders will return to function as traditional local directories, ensuring total privacy and physical control over your data.






