I
I
Igor2019-09-06 19:04:13
Windows
Igor, 2019-09-06 19:04:13

How to remove Docker from Windows?

Colleagues, good evening.
Docker under Windows is dead and does not want to rise.
Operating system Windows 10
And in order for him to die, I didn’t do anything.
Sucked up the update and didn't get up anymore.
I'm trying to remove by standard means.
5d728240816e6743542160.png
But this is an endless process.
In the task manager, I observe that the installer does not even strain the system.
All load indicators are in zeros.
There is an option to use PowerShell
But even here, not everything is smooth.
PowerShell tells you that you can't execute this script, go there, ask there.
Some kind of quest or visit to government offices.
How to remove Docker from Windows?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor, 2019-09-06
@IgorPI

PowerShell

$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" }

But it will not be possible to execute the script with the default configuration of PowerShell
To do this, run as administrator
And then
+ You should clean all the trash from the windows registry

E
Ezhyg, 2019-09-06
@Ezhyg

PowerShell says you can't execute this script, go there, ask there

On behalf of the admin? "Permissions" turned on?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question