How to remove odrive entirely from Windows?

I started with the problem that odrive lost its right-click context menu on two Windows 10 boxes. A pain, but workable until I needed to restore multiple files from the cloud. I tried the “Repair” option on the installer to no effect.

OK, let’s uninstall odrive and reinstall. Now odrive simply does not run on either system. I see the launcher opening a pair of odrive.exe processes that terminate shortly by themselves.

Where does odrive hide its configuration data on Windows? The uninstaller appears unable to remove things to get back to a working state.

Answering my own question:

1: Delete %HOMEPATH%.odrive
2: Scour the registry for odrive keys (ignoring recent items entries) and nuke them,

Outcome: odrive installs and runs the initial setup again. Unfortunately context menu entries do not reappear.

More digging through the registry revealed that the Windows shell extension for odrive contained corrupt data. Deleting both the CLSID and registry keys that pointed to it, uninstalling odrive, and finally reinstalling odrive fixed the problem. Hallelujah!

The odrive team can improve matters here by offering (a) an uninstaller that offers the option to wipe all odrive data or (b) an installer that allows overwriting the full configuration rather than leaving existing stuff alone. Perhaps an in-place upgrade vs. overwrite option?

Hi @Ethan,
Thanks for the follow-up on this.

There is some manual clean-up the uninstall does in a post-uninstall script because of the mix of system vs user registry entries. Here is what the uninstaller tries to remove when uninstalling, in addition to removing the app from Program Files, renaming the odrive folder to a backup name, removing the .odrive folder, and some “automatic” removal by Windows during the uninstall process:

#User registry entries (HKCU)
"HKCU:\Software\odrive*"
"HKCU:\Software\Classes\odrive.*"
"HKCU:\Software\Classes\.cloud*"
"HKCU:\Software\Classes\.lockd*"
"HKCU:\Software\Classes\.cloud*"
"HKCU:\Software\Classes\.gdocx"
"HKCU:\Software\Classes\.space"
"HKCU:\Software\Classes\.gsheetx"
"HKCU:\Software\Classes\.gformx"
"HKCU:\Software\Classes\.gslidesx"
"HKCU:\Software\Classes\.gdrawx"
"HKCU:\Software\Classes\.gmapx"
"HKCU:\Software\Classes\.onotex"
"HKCU:\Software\Classes\CLSID\{102986AF-0728-447D-83B4-C3CD4F70F273}"
"HKCU:\Software\Classes\Wow6432Node\CLSID\{102986AF-0728-447D-83B4-C3CD4F70F273}"
"HKCU:\Software\Classes\CLSID\{4585263E-BEF5-4A39-A2E8-8F69E0054F0C}"
"HKCU:\Software\Classes\CLSID\{679ADC87-66BB-43BF-9DC3-3DE2E4A32B8C}"
"HKCU:\Software\Classes\CLSID\{E07BCA71-E88B-4A5E-BA46-69A52D6B9B20}"
"HKCU:\Software\Classes\CLSID\{35B08E96-DA1F-4321-BF80-D6B53C20F3CF}"
"HKCU:\Software\Classes\AppId\{4585263E-BEF5-4A39-A2E8-8F69E0054F0C}"
"HKCU:\Software\Classes\AppId\{679ADC87-66BB-43BF-9DC3-3DE2E4A32B8C}"
"HKCU:\Software\Classes\AppId\{E07BCA71-E88B-4A5E-BA46-69A52D6B9B20}"
"HKCU:\Software\Classes\AppId\{35B08E96-DA1F-4321-BF80-D6B53C20F3CF}"
"HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{102986AF-0728-447D-83B4-C3CD4F70F273}"
"HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{102986AF-0728-447D-83B4-C3CD4F70F273}"

#HKLM entries for the Win 10 sync root feature
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager\odrive*"
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager\odrive*"

#odrive Explorer shortcut
"$HOME\Links\odrive.lnk"

Are the entires you found within this set? Its possible that there were errors removing them if there was some sort of corruption in the registry and the attempt was failing.

I tried again in a VM on a stock Win 10 x64 installation. After installing odrive and accessing various encrypted shares, there were the standard plethora of odrive.* keys in HKCU\Software. Most but not all were removed when uninstalling odrive.

Is there any chance that odrive can follow standard conventions and place all subkeys inside a single HKCU\Software\odrive entry? Cleanup would be made easier.

Thanks for the continued feedback @Ethan.

I wonder if this could have to do with the user running the uninstall. The HKCU entries and profile entries are tricky because they only apply to the user running the uninstaller. You can end up in a situation where either you have multiple users or you have a different user running the uninstall. In this case I can definitely see that things would be missed.

Consolidating the entries is definitely a better way to organize, and is done in the next generation stuff.

I’ve been doing some testing and I am not seeing residual registry entries on uninstall when running uninstall as the logged-in user.

For reference, here is a powershell script that can be run as the currently logged-in user that should clean up everything:

#Powershell script to remove all user-specific odrive content. Uninstaller code will handle everything else.
#Remove Current User registry entries (HKCU)
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\odrive*"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\odrive.*"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\.cloud*"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\.lockd*"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\.cloud*"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\.gdocx"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\.space"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\.gsheetx"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\.gformx"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\.gslidesx"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\.gdrawx"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\.gmapx"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\.onotex"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\CLSID\{102986AF-0728-447D-83B4-C3CD4F70F273}"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\Wow6432Node\CLSID\{102986AF-0728-447D-83B4-C3CD4F70F273}"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\CLSID\{4585263E-BEF5-4A39-A2E8-8F69E0054F0C}"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\CLSID\{679ADC87-66BB-43BF-9DC3-3DE2E4A32B8C}"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\CLSID\{E07BCA71-E88B-4A5E-BA46-69A52D6B9B20}"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\CLSID\{35B08E96-DA1F-4321-BF80-D6B53C20F3CF}"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\AppId\{4585263E-BEF5-4A39-A2E8-8F69E0054F0C}"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\AppId\{679ADC87-66BB-43BF-9DC3-3DE2E4A32B8C}"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\AppId\{E07BCA71-E88B-4A5E-BA46-69A52D6B9B20}"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Classes\AppId\{35B08E96-DA1F-4321-BF80-D6B53C20F3CF}"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{102986AF-0728-447D-83B4-C3CD4F70F273}"
rp -ErrorAction SilentlyContinue -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{102986AF-0728-447D-83B4-C3CD4F70F273}"

#Remove user-specific HKLM entries for the Win 10 sync root feature
rm -Recurse -ErrorAction SilentlyContinue -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager\odrive*"
rm -Recurse -ErrorAction SilentlyContinue -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager\odrive*"

#Kill odrive
kill -ErrorAction SilentlyContinue -n odriveapp
kill -ErrorAction SilentlyContinue -n odrive

#Restart Explorer here to release extensions
kill -ErrorAction SilentlyContinue -n explorer
sleep 5

#Remove the odrive Explorer shortcut
rm -Force -ErrorAction SilentlyContinue -Path "$HOME\Links\odrive.lnk"

#Rename the user's odrive folder to a "backup" name
mv -Force -ErrorAction SilentlyContinue -Path "$HOME\odrive" "$HOME\odrive_backup_$(get-date -f yyyy-MM-dd-hh-mm-ss)"

#Remove the .odrive folder from the user's home dir
rm -Recurse -Force -ErrorAction SilentlyContinue -Path "$HOME\.odrive"

Some things could fail if things are being held open by applications or open file handles.