1. Run CMD as administrator, and then kill OneDrive process
taskkill /f /im OneDrive.exe
2. Uninstall OneDrive for 32bit Windows 10
%SystemRoot%System32OneDriveSetup.exe /uninstall
3. Uninstall OneDrive for 64bit Windows 10
%SystemRoot%SysWOW64OneDriveSetup.exe /uninstall
4. Delete OneDrive folder
rd "%UserProfile%OneDrive" /Q /S rd "%LocalAppData%MicrosoftOneDrive" /Q /S rd "%ProgramData%Microsoft OneDrive" /Q /S rd "C:OneDriveTemp" /Q /S
5. Delete registry keys for OneDrive.
REG Delete "HKEY_CLASSES_ROOTCLSID{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f REG Delete "HKEY_CLASSES_ROOTWow6432NodeCLSID{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f