Docker Community Forums

Share and learn in the Docker community.

Cannot uninstall Docker for Windows


(Xavierguarch) #1

Expected behavior

When choosing to uninstall Docker for Windows, it should uninstall.

Actual behavior

Uninstallation hangs forever.

Information

  • Docker for Windows Version: 1.11.2-beta15 (build: 4450)
  • OS: Windows 10 Pro
  • Edition: Professional
  • Id: 1511
  • Build: 10586
  • BuildLabName: 10586.306.amd64fre.th2_release_sec.160422-1850
  • Mixpanel Id: 424C54B9-A3C8-4DB0-8492-99DE4AC1EFC0
  • Sha1: a513059b802e37621c4ef5113f29050d2ca39a43

Steps to reproduce the behavior

  1. Open Start > Settings > System > Apps & features
  2. Search Docker and select Uninstall.
  3. Uninstallation never ends

(Mikefcooper) #2

I have the same issue on Windows 10 Pro. Both update to latest version and uninstall of Docker for Windows freezes with time remaining unchanged.


(Ffisegydd) #3

Same issue.

I’m trying to uninstall because Docker currently is not working (it fails to start) and so am trying to reinstall.

Both uninstalling using the Windows Apps & features, and trying to reinstall using the InstallDocker executable, fail.


(Fasthall) #4

Sam here. Cannot uninstall or upgrade.


(Mikefcooper) #5

Another update has become available and once again the install hangs just after it starts with a small part of the progress bar green. The only way to install that I’ve found is to manually uninstall the software then reinstall.


(Emmanuel Briney) #6

Hi guys,

sorry for the convenience.
Is one if you can show me the content of his uninstall log (in your User/AppData/Local/Docker dir, install-log-xxxx.txt, the oldest one after uninstalling the app) ?


(Ffisegydd) #7

I think that this is the oldest log since I’ve had the issues, but I’m not 100% sure. Looking at other logs I seem to get this error quite a bit:

[08:23:33.866][Installer ][Info ] Version: 1.11.1.3073
[08:23:33.867][Installer ][Info ] Starting on: 6/19/2016 8:23:33 AM
[08:23:33.867][Installer ][Info ] Resources: C:\Program Files\Docker\Docker\Resources
[08:23:33.868][Installer ][Info ] OS: Windows 10 Pro
[08:23:33.868][Installer ][Info ] Edition: Professional
[08:23:33.868][Installer ][Info ] Id: 1511
[08:23:33.869][Installer ][Info ] Build: 10586
[08:23:33.869][Installer ][Info ] BuildLabName: 10586.420.amd64fre.th2_release_sec.160527-1834
[08:23:33.872][Installer ][Info ] Sha1: 2fb5b031ee60c8a9b514883b54bcea8cf6d2ae8f
[08:23:34.172][Installer ][Info ] Killing processes…
[08:23:34.185][Installer ][Info ] Preparing upgrade…
[08:23:34.186][HyperV ][Info ] Destroy
[08:23:34.189][PowerShell ][Info ] Run script with parameters: -Destroy True -KeepVolume True…
[08:23:34.856][Installer ][Error ] A parameter cannot be found that matches parameter name ‘KeepVolume’.


(Tannerwatson) #8

I’m getting the same issue on Windows 10 Pro. The installer becomes unresponsive and uncancellable at “Preparing Docker VM upgrade”

[17:35:19.572][Installer ][Info ] Version: 1.12.0.4760
[17:35:19.573][Installer ][Info ] Starting on: 7/9/2016 5:35:19 PM
[17:35:19.573][Installer ][Info ] Resources: C:\Program Files\Docker\Docker\Resources
[17:35:19.573][Installer ][Info ] OS: Windows 10 Pro
[17:35:19.573][Installer ][Info ] Edition: Professional
[17:35:19.574][Installer ][Info ] Id: 1511
[17:35:19.574][Installer ][Info ] Build: 10586
[17:35:19.574][Installer ][Info ] BuildLabName: 10586.420.amd64fre.th2_release_sec.160527-1834
[17:35:19.575][Installer ][Info ] Sha1: 999af1eac01deb75d9f166febb99a14b96b88ae3
[17:35:19.790][Installer ][Info ] Killing processes…
[17:35:19.795][Installer ][Info ] Preparing upgrade…
[17:35:19.795][HyperV ][Info ] Destroy
[17:35:19.802][PowerShell ][Info ] Run script with parameters: -Destroy True -KeepVolume True…
[17:35:23.949][HyperV ][Info ] Kill VM MobyLinuxVM…
[17:35:23.964][HyperV ][Info ] VM MobyLinuxVM is stopped
[17:35:23.966][HyperV ][Info ] Destroying Switch DockerNAT…
[17:35:25.447][HyperV ][Info ] Destroying VM MobyLinuxVM…
[17:35:25.599][HyperV ][Info ] Keep VHD C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx
[17:35:25.601][Firewall ][Info ] Closing ports…
[17:35:26.125][Firewall ][Info ] Ports are closed
[17:35:26.126][HyperVGuids ][Info ] Removing GUIDs…
[17:35:26.126][HyperVGuids ][Info ] GUIDs removed
[17:35:26.126][Installer ][Info ] Prepare upgrade completed successfully


(Xbaro) #9

The same here.

Error 1714. The older version of Docker cannot be removed. Contact your technical support group. System Error 1612.
=== Logging stopped: 10/07/2016 18:51:26 ===


(Rezonant) #10

How is it possible that this is still an issue after a month? Can someone please release a fix for users stuck with a broken version of Docker?

EDIT: After deleting the contents of C:\Program Files\Docker and then downloading a fresh Docker MSI, then using the Remove option after it offers Repair or Remove, then finally reinstalling using that MSI, I was able to get around this issue and get the latest version of Docker installed.


(Emmanuel Briney) #11

Sorry for the delay. I tried to reproduce this bug without success, so I wrote a script that will be ship in the next version but as you cannot uninstall, I dump here the procedure so you can install the latest version.

Open a powershell as administrator and copy/paste this script:

‘C:\Program Files\Docker\Docker\resources\MobyLinux.ps1’ -Destroy
$service = Get-WmiObject -Class Win32_Service -Filter “Name=‘com.docker.service’”
$service.StopService()
$service.Delete()
Start-Sleep -s 5
Remove-Item -Recurse -Force "~/AppData/Local/Docker"
Remove-Item -Recurse -Force "~/AppData/Roaming/Docker"
takeown.exe /F “C:\ProgramData\Docker” /R /A /D Y
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 | ForEach-Object {Get-ItemProperty $.PSPath} | Where-Object { $.DisplayName -eq “Docker” } | Remove-Item -Recurse -Force
Get-ChildItem hklm:\software\classes\installer\products | ForEach-Object {Get-ItemProperty $.pspath} | Where-Object { $.ProductName -eq “Docker” } | Remove-Item -Recurse -Force
Get-Item ‘HKLM:\software\Docker Inc.’ | Remove-Item -Recurse -Force
Get-ItemProperty -path HKCU:\software\microsoft\windows\currentversion\Run -name “Docker for Windows” | Remove-Item -Recurse -Force

And go to docker for windows page to install the lastest version, stable is 1.12.0 and beta is the same with experimental features enabled.


(Thomas Sjögren) #12

Github issue: https://github.com/docker/docker/issues/24142


(Manuinnz) #13

Merci Emmanuel

Just a couple of issues with the powershell script above.
Had issues running with the -Destroy parameter but just evaluetd the functions direct to be able to invoike directly the destroy functions (Stop-MobyLinuxVM, Destroy-Switch, Destroy-MobyLinuxVM).
In your for loop you miss the (underscore) for the current object variable ($) might be related to the message board app. I see it is with the underscore in the ForceRemoveDocker.ps1 of the new release.

Get-ChildItem hklm:\software\microsoft\windows\currentversion\uninstall | ForEach-Object {Get-ItemProperty $.PSPath} | Where-Object { $.DisplayName -eq “Docker” } | Remove-Item -Recurse -Force
Get-ChildItem hklm:\software\classes\installer\products | ForEach-Object {Get-ItemProperty $.pspath} | Where-Object { $.ProductName -eq “Docker” } | Remove-Item -Recurse -Force

Thank you again very much for this as it was quite annoying being stuck with the installer or uninstaller.

Cheers
Emmanuel


(Ericis) #14

This worked for me. The first line had to have C:\...\MobyLinux.ps1 -Destroy, including the parameter, all in quotes.

I ran each line (or group of lines, like $service) as Admin


(Peteboyrocket) #15

I’ve had to do this for every new beta update, do you know what causes it?


(Ozium13) #16

Still having this issue with the last update for Windows and we’re just a few days away from 2017. Sure feels like beta to me. I can’t update it, I can’t uninstall it, and the script doesn’t work for me (even with the edits the others offered). Can’t think of another piece of software where the uninstaller failed on me for some years now. Really, really disappointing effort from Docker. As much as I’d love to upload some log files and such I think I’ll just abstain and wait until this thing is fully baked. Can someone let me know when that happens?


(Baltrap) #17

the same here, nothing works :confused:


(Michael Friis) #18

Can you please post the content of the install log? Cannot uninstall Docker for Windows

Also consider opening an issue on https://github.com/docker/for-win/issues/new


(Nickiannone) #19

Ok, so I have a bit of an update in dealing with this.

Through this post, and the discovery of the ForceRemoveDocker.ps1 PowerShell script (by default, “C:\Program Files\Docker\Docker\resources\ForceRemoveDocker.ps1” in Docker for Windows 1.13+ I believe), I was able to work through an issue with configuring Docker for Windows over top of a previous installation of Docker and VirtualBox.

The process I went through to get it to work is here: https://github.com/docker/for-win/issues/515#issuecomment-281819259

Hope this helps.


(Larswh) #20

I was also unable to reinstall Docker (Community Edition) for Windows. I tried all the suggested PowerShell scripts suggested, but without success. The error message I got when installing ‘Stable’ and ‘Edge’ was not the same, and that helped me find this solution (a registry fix):
https://success.docker.com/KBase/Docker.For.Win_-_Install_fails_on_installationmanifest.json