To quickly and precisely remove Microsoft OneDrive from your Windows 11 system via the command line, the most direct method involves using the built-in OneDrive setup executable with specific parameters.
Step-by-Step Command Line Uninstallation
You can efficiently uninstall OneDrive for all users on your Windows 11 PC by following these steps:
- Open the Run Dialog: Press the
Win
+R
keys simultaneously on your keyboard. This will bring up the "Run" dialog box. - Enter the Uninstall Command: In the "Run" dialog, type or paste the following command exactly as shown:
C:\Windows\System32\OneDriveSetup.exe /uninstall /allusers
- Execute the Command: Press
Enter
or clickOK
. - Wait for Uninstallation: Allow a few moments for the process to complete. OneDrive will silently uninstall in the background. You might not see a confirmation dialog, but the application and its associated files will be removed.
Understanding the OneDrive Uninstall Command
The command C:\Windows\System32\OneDriveSetup.exe /uninstall /allusers
consists of several important parts:
C:\Windows\System32\OneDriveSetup.exe
: This is the full path to the official OneDrive setup executable file, which also handles uninstallation. It's a core component found within your Windows system directory./uninstall
: This is a command-line switch that instructs theOneDriveSetup.exe
program to perform an uninstallation operation rather than an installation or update./allusers
: This crucial switch ensures that OneDrive is uninstalled for all user profiles on the computer. If omitted, OneDrive might only be uninstalled for the current user, or its removal might be incomplete. Using/allusers
guarantees a system-wide removal.
What Happens After Uninstallation?
Once the command is executed, OneDrive will be removed from your system. This means:
- The OneDrive application will no longer appear in your Start Menu or the list of installed apps.
- The OneDrive sync client will cease to run, and the icon will disappear from your taskbar's notification area.
- Its integration with File Explorer will be removed.
Important Note: Uninstalling OneDrive removes the application from your computer. It does not delete your files stored in the cloud on OneDrive.com. Your files will remain safely accessible through a web browser. Local files that were synced to OneDrive might remain in your user profile folder (C:\Users\<YourUsername>\OneDrive
), but they will no longer sync. You can manually delete these local files if you no longer need them on your PC.
Verifying OneDrive's Removal
To confirm that OneDrive has been successfully uninstalled:
- Check the list of installed applications: Go to
Settings
>Apps
>Installed apps
and search for "OneDrive." It should no longer be listed. - Look for the OneDrive folder in File Explorer: Navigate to
C:\Users\<YourUsername>\
. The "OneDrive" folder might still exist with your locally cached files, but it should no longer be an active sync folder. - Restart your computer: Sometimes a restart can help finalize the removal process and clear any lingering processes.
Reinstalling OneDrive (If Needed)
Should you ever need to reinstall OneDrive, you can usually download the latest version directly from Microsoft's official OneDrive website or find the installer in C:\Windows\SysWOW64\
or C:\Windows\System32\
if a previous version exists.