Can I/how do I safely purge OneDrive from my computer?

DrezDrez Registered User regular
OneDrive was nice for a time, but I realized it took over My Documents, essentially creating a duplicate and making it the default save location for various programs/etc. (which is really confusing - wtf, Microsoft?), and it also now tries to sync 120GB to my Microsoft Surface which is just ridiculous.

Is there a good way to clean this from my system without screwing up any programs or anything?

For safety, I'm copying/moving all data from the OneDrive folders out of the OneDrive folders (while it is turned off on my desktop and surface).

Switch: SW-7690-2320-9238
Steam/PSN/Xbox: Drezdar
Playing: Persona 5 Royal (PS4), Animal Crossing (SW), FF7remake (PS4)

Posts

  • HandgimpHandgimp R+L=J Family PhotoRegistered User regular
    This batch file worked for me a while back with no ill effects, but I can't guarantee anything. I'd recommend a restore point if you decide to use it.
    @Echo off
    cls
     
    set x86="%SYSTEMROOT%\System32\OneDriveSetup.exe"
    set x64="%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe"
     
    echo Closing OneDrive process.
    echo.
    taskkill /f /im OneDrive.exe > NUL 2>&1
    ping 127.0.0.1 -n 5 > NUL 2>&1
     
    echo Uninstalling OneDrive.
    echo.
    if exist %x64% (
    %x64% /uninstall
    ) else (
    %x86% /uninstall
    )
    ping 127.0.0.1 -n 5 > NUL 2>&1
     
    echo Removing OneDrive leftovers.
    echo.
    rd "%USERPROFILE%\OneDrive" /Q /S > NUL 2>&1
    rd "C:\OneDriveTemp" /Q /S > NUL 2>&1
    rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S > NUL 2>&1
    rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S > NUL 2>&1
     
    echo Removeing OneDrive from the Explorer Side Panel.
    echo.
    REG DELETE "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1
    REG DELETE "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1
     
    pause
    

    PwH4Ipj.jpg
Sign In or Register to comment.