Your cart is currently empty!
How to remove OneDrive from Windows via DISM
Written by
in
If you’re tired of OneDrive popping up or running in the background when you don’t use it, you’re not alone. Many Windows users want a clean system without unnecessary extras. OneDrive is built into Windows 10 and 11, but it’s not untouchable. You can remove it using DISM (Deployment Image Servicing and Management) — a powerful built-in command-line tool.
Here’s how to do it, step by step.
⚠️ Warning Before You Begin
This method removes OneDrive system-wide — not just for your user profile. It’s intended for advanced users or IT admins. If you’re unsure, back up your system first.
Step 1: Open Command Prompt as Administrator
- Press
Windows + S
and search for cmd. - Right-click on Command Prompt and select Run as administrator.
Step 2: Find the OneDrive Package Name
Run the following command to list all provisioned apps (preinstalled packages):
dism /Online /Get-ProvisionedAppxPackages | findstr OneDrive
You’ll see something like:
PackageName : Microsoft.OneDrive_21.230.1107.0004_neutral_~_8wekyb3d8bbwe
Copy the full package name.
Step 3: Remove OneDrive from Windows
Now remove it using this command (replace the package name with the one you copied):
dism /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.OneDrive_21.230.1107.0004_neutral_~_8wekyb3d8bbwe
Wait for it to complete. You should see a message confirming that the operation completed successfully.
Step 4: Clean Up Leftovers (Optional)
Even after removal, some OneDrive files may stick around. Run these additional commands to clean up:
taskkill /f /im OneDrive.exe
rd "%UserProfile%\OneDrive" /Q /S
rd "C:\OneDriveTemp" /Q /S
You can also remove the OneDrive entry from File Explorer’s sidebar using registry tweaks, but that’s a separate topic.
Done — OneDrive is Gone
That’s it. You’ve removed OneDrive using DISM — no third-party tools, no guesswork.
💡 Pro Tip:
If you’re managing multiple systems, you can integrate this step into your deployment script or image prep process.
Got questions or want more advanced Windows cleanup tips? Drop a comment below.