Docker Community Forums

Share and learn in the Docker community.

Cannot uninstall Docker for Windows


(Djarvis8) #21

Same problem here. When trying to install the latest community edition exe installer it thinks an older version still exists and prompts with “Do you want to replace your current version of Docker for Windows with this new one 17.09.0-ce-win33 (13620)?”. When I hit “yes” the main dialog simply says “Installation canceled”.

I tried all powershell scripts mentioned, tried manually blowing away anything to do with docker for windows on the file system as well as the registry, still same problem. Tried larshw’s link to remove a registry key but I didn’t have that key.

What registry key is this thing looking for??? I can’t figure it out. Installer log shows nothing of importance:

=== Verbose logging started: 10/11/2017  8:50:49  Build type: SHIP UNICODE 5.00.10011.00  Calling process: C:\Users\dan_000\Desktop\Docker for Windows Installer (2).exe ===
MSI (c) (B8:D0) [08:50:49:162]: Font created.  Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg

MSI (c) (B8:D0) [08:50:49:162]: Font created.  Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg

MSI (c) (B8:FC) [08:50:49:170]: Resetting cached policy values
MSI (c) (B8:FC) [08:50:49:170]: Machine policy value 'Debug' is 0
MSI (c) (B8:FC) [08:50:49:170]: ******* RunEngine:
           ******* Product: {34B78221-C2E1-4AE3-9A3D-3DDD1E8A3E2F}
           ******* Action: 
           ******* CommandLine: **********
MSI (c) (B8:FC) [08:50:49:170]: Client-side and UI is none or basic: Running entire install on the server.
MSI (c) (B8:FC) [08:50:49:170]: Grabbed execution mutex.
MSI (c) (B8:FC) [08:50:49:172]: Cloaking enabled.
MSI (c) (B8:FC) [08:50:49:172]: Attempting to enable all disabled privileges before calling Install on Server
MSI (c) (B8:FC) [08:50:49:173]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (14:30) [08:50:49:176]: Running installation inside multi-package transaction {34B78221-C2E1-4AE3-9A3D-3DDD1E8A3E2F}
MSI (s) (14:30) [08:50:49:176]: Grabbed execution mutex.
MSI (s) (14:CC) [08:50:49:177]: Resetting cached policy values
MSI (s) (14:CC) [08:50:49:177]: Machine policy value 'Debug' is 0
MSI (s) (14:CC) [08:50:49:177]: ******* RunEngine:
           ******* Product: {34B78221-C2E1-4AE3-9A3D-3DDD1E8A3E2F}
           ******* Action: 
           ******* CommandLine: **********
MSI (s) (14:CC) [08:50:49:177]: Machine policy value 'DisableUserInstalls' is 0
MSI (s) (14:CC) [08:50:49:177]: MainEngineThread is returning 1605
MSI (s) (14:30) [08:50:49:178]: User policy value 'DisableRollback' is 0
MSI (s) (14:30) [08:50:49:178]: Machine policy value 'DisableRollback' is 0
MSI (s) (14:30) [08:50:49:178]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (14:30) [08:50:49:178]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (14:30) [08:50:49:179]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (14:30) [08:50:49:179]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (c) (B8:FC) [08:50:49:180]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (c) (B8:FC) [08:50:49:181]: MainEngineThread is returning 1605
=== Verbose logging stopped: 10/11/2017  8:50:49 ===

(Mikecheel) #22

Docker (at least for windows) really really really needs to get its install / upgrade / uninstall act together. When I have issues uninstalling I use this powershell script from an admin powershell session:

$ErrorActionPreference = “SilentlyContinue”

kill -force -processname ‘Docker for Windows’, com.docker.db, vpnkit, com.docker.proxy, com.docker.9pdb, moby-diag-dl, dockerd

try {
./MobyLinux.ps1 -Destroy
} Catch {}

$service = Get-WmiObject -Class Win32_Service -Filter "Name=‘com.docker.service’"
if ($service) { $service.StopService() }
if ($service) { $service.Delete() }
Start-Sleep -s 5
Remove-Item -Recurse -Force "~/AppData/Local/Docker"
Remove-Item -Recurse -Force "~/AppData/Roaming/Docker"
if (Test-Path “C:\ProgramData\Docker”) { takeown.exe /F “C:\ProgramData\Docker” /R /A /D Y }
if (Test-Path “C:\ProgramData\Docker”) { icacls “C:\ProgramData\Docker” /T /C /grant Administrators:F }
Remove-Item -Recurse -Force "C:\ProgramData\Docker"
Remove-Item -Recurse -Force "C:\Program Files\Docker"
Remove-Item -Recurse -Force "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Docker"
Remove-Item -Force "C:\Users\Public\Desktop\Docker for Windows.lnk"
Get-ChildItem HKLM:\software\microsoft\windows\currentversion\uninstall | % {Get-ItemProperty $.PSPath} | ? { $.DisplayName -eq “Docker” } | Remove-Item -Recurse -Force
Get-ChildItem HKLM:\software\classes\installer\products | % {Get-ItemProperty $.pspath} | ? { $.ProductName -eq “Docker” } | Remove-Item -Recurse -Force
Get-Item ‘HKLM:\software\Docker Inc.’ | Remove-Item -Recurse -Force
Get-ItemProperty HKCU:\software\microsoft\windows\currentversion\Run -name “Docker for Windows” | Remove-Item -Recurse -Force
#Get-ItemProperty HKCU:\software\microsoft\windows\currentversion\UFH\SHC | ForEach-Object {Get-ItemProperty $.PSPath} | Where-Object { $.ToString().Contains(“Docker for Windows.exe”) } | Remove-Item -Recurse -Force $.PSPath
#Get-ItemProperty HKCU:\software\microsoft\windows\currentversion\UFH\SHC | Where-Object { $(Get-ItemPropertyValue $
) -Contains “Docker” }


(Djarvis8) #23

Nope, that script, along with every other powershell script I’ve tried did not work for me.

I ended up running process monitor on the Docker for Windows.exe installer program figuring it was checking some dumb stupid file or registry key that isn’t obvious to anyone or anything else.

So it ended up being some key in HKCR\Installer\UpgradeCodes that I found it was reading. When I blew that away it FINALLY proceeded into thinking it was a fresh install!

If anyone has any such similar problem and after completely manually obliterating everything to do with docker on your machine and the package still refuses to install, run Process Monitor on the installer executable and filter on just the registry key reads. Find the key that it successfully reads under HKCR\Installer\UpgradeCodes and blow it away.


(Zaouad) #24

The latest docker (17.09.0-ce-win33 & win34) install hangs with no explanation whatsoever at "Removing files …"
I have tried everything possible with no success whatsoever:

  • I completely uninstalled docker.
  • I install as administrator.
  • I tried to clean the FS and the registry.
  • I tried every blog/solution/suggestion here.

This is the first version where installing docker from scratch hangs.


(Iaracy) #25

Saved my day (week and month …)!


(Stygy) #26

This was a really helpful answer.
Downloaded Process Monitor, filtered by Docker and looked for the UpgradeCodes key (this appears after you click continue)


(Enerloop) #27

Docker really does need to get its installer act together.

I am having the same problem - I just cannot get Docker to uninstall or reinstall, or anything.

It either hangs, or stubbornly maintains that the original version is installed.

Perhaps docker could add a “repair” button to their installer, which just reinstalls everything from scratch? It’s quite clear that Docker can get into a weird state that requires repairing.

Am running Docker Windows 17.09.0-ce-win33.


(Enerloop) #28

After 2 days of frustration, finally got Docker to work:

1.Installed the next experimental version of Docker (Docker Edge).
2.Installing the new experimental version fixed up issues with the previous stable version.
3.Have not tried to uninstall, but I think this might work now.

I am lucky that this worked (I had everything prepared to reinstall Windows from scratch just to get Docker working, this would have happened 10 minutes later).


(Evilshrike) #29

The same thing here.

I downloaded the latest Docker (17), run, said “Yes” to “would you like to replace the existing”.
It opens to me MSI dialog with broken tmp7130.msi.

The mentioned above PS-script is broken. It removes something but fails at removing Installation info (what is PSPath?)

After I removed manually everything in Windows registry related to Docker the installer still suggests to replace but after choosing “Yes” it shows “Cancelled”

It’s simply terrible.
Isn’t it so hard to create a working installer for Windows after all these years? Hilarious.


(Kallie B. (Microsoft Container Networking)) #30

Hi all!

I just wrote up some uninstall/cleanup instructions for Docker on Windows 10 and Windows Server 2016. Here’s the PR for the update to our docs: https://github.com/MicrosoftDocs/Virtualization-Documentation/pull/684

Here’s a preview link for the changes corresponding to this PR as well.

It would be a great help if folks from this thread could validate/provide feedback on the clarity and effectiveness of these instructions.

Thanks,
–Kallie B.
(Windows Core Networking)


(Rreiss) #31

Just had the same issue on a fresh Windows 10 installation, and I was able to remove D4W by running CCleaner registry cleaner :S