{"action":"created","issue":{"url":"https://api.github.com/repos/docker/for-win/issues/1544","repository_url":"https://api.github.com/repos/docker/for-win","labels_url":"https://api.github.com/repos/docker/for-win/issues/1544/labels{/name}","comments_url":"https://api.github.com/repos/docker/for-win/issues/1544/comments","events_url":"https://api.github.com/repos/docker/for-win/issues/1544/events","html_url":"https://github.com/docker/for-win/issues/1544","id":288211643,"node_id":"MDU6SXNzdWUyODgyMTE2NDM=","number":1544,"title":"Can't remove C:\\ProgramData\\Docker after uninstalling Docker","user":{"login":"davidmatson","id":3360277,"node_id":"MDQ6VXNlcjMzNjAyNzc=","avatar_url":"https://avatars2.githubusercontent.com/u/3360277?v=4","gravatar_id":"","url":"https://api.github.com/users/davidmatson","html_url":"https://github.com/davidmatson","followers_url":"https://api.github.com/users/davidmatson/followers","following_url":"https://api.github.com/users/davidmatson/following{/other_user}","gists_url":"https://api.github.com/users/davidmatson/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmatson/subscriptions","organizations_url":"https://api.github.com/users/davidmatson/orgs","repos_url":"https://api.github.com/users/davidmatson/repos","events_url":"https://api.github.com/users/davidmatson/events{/privacy}","received_events_url":"https://api.github.com/users/davidmatson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-01-12T18:46:45Z","updated_at":"2018-07-04T06:37:51Z","closed_at":null,"author_association":"NONE","body":"### Expected behavior\r\nC:\\ProgramData\\Docker is gone or easy to remove.\r\n\r\n### Actual behavior\r\nC:\\ProgramData\\Docker is present and can't be deleted via Windows explorer\r\n\r\n### Steps to reproduce the behavior\r\n\r\n  1. Install Docker and use it with Windows containers.\r\n  2. Uninstall Docker.\r\n"},"comment":{"url":"https://api.github.com/repos/docker/for-win/issues/comments/402378579","html_url":"https://github.com/docker/for-win/issues/1544#issuecomment-402378579","issue_url":"https://api.github.com/repos/docker/for-win/issues/1544","id":402378579,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjM3ODU3OQ==","user":{"login":"ganeshdeshmukh1612","id":26863216,"node_id":"MDQ6VXNlcjI2ODYzMjE2","avatar_url":"https://avatars1.githubusercontent.com/u/26863216?v=4","gravatar_id":"","url":"https://api.github.com/users/ganeshdeshmukh1612","html_url":"https://github.com/ganeshdeshmukh1612","followers_url":"https://api.github.com/users/ganeshdeshmukh1612/followers","following_url":"https://api.github.com/users/ganeshdeshmukh1612/following{/other_user}","gists_url":"https://api.github.com/users/ganeshdeshmukh1612/gists{/gist_id}","starred_url":"https://api.github.com/users/ganeshdeshmukh1612/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ganeshdeshmukh1612/subscriptions","organizations_url":"https://api.github.com/users/ganeshdeshmukh1612/orgs","repos_url":"https://api.github.com/users/ganeshdeshmukh1612/repos","events_url":"https://api.github.com/users/ganeshdeshmukh1612/events{/privacy}","received_events_url":"https://api.github.com/users/ganeshdeshmukh1612/received_events","type":"User","site_admin":false},"created_at":"2018-07-04T06:37:51Z","updated_at":"2018-07-04T06:37:51Z","author_association":"NONE","body":"according to @StingyJack ,\r\n I went to `C:\\Program Files\\Docker`, by opening `cmd` as administrator.\r\nrun `takeown /R /F *` \r\nrun `ICACLS * /T /Q /C /RESET`,\r\nbut I could not delete Docker folder but it helped to remove error `Access is denied`.\r\n** don't run in Program files folder, otherwise you will go to bootloop after restart, go to `Docker` folder first.\r\n\r\naccording to @silentbobbert, I checked his link and it worked.\r\nI created the small file with following content and saved with extension `.ps1` in Program files folder, and right click on it and `Run with Powershell`.\r\n```$ErrorActionPreference = \"SilentlyContinue\"\r\n\r\n    kill -force -processname 'Docker for Windows', com.docker.db, vpnkit, com.docker.proxy, com.docker.9pdb, moby-diag-dl, dockerd\r\n\r\n    try {\r\n        ./MobyLinux.ps1 -Destroy\r\n    } Catch {}\r\n\r\n    $service = Get-WmiObject -Class Win32_Service -Filter \"Name='com.docker.service'\"\r\n    if ($service) { $service.StopService() }\r\n    if ($service) { $service.Delete() }\r\n    Start-Sleep -s 5\r\n    Remove-Item -Recurse -Force \"~/AppData/Local/Docker\"\r\n    Remove-Item -Recurse -Force \"~/AppData/Roaming/Docker\"\r\n    if (Test-Path \"C:\\ProgramData\\Docker\") { takeown.exe /F \"C:\\ProgramData\\Docker\" /R /A /D Y }\r\n    if (Test-Path \"C:\\ProgramData\\Docker\") { icacls \"C:\\ProgramData\\Docker\\\" /T /C /grant Administrators:F }\r\n    Remove-Item -Recurse -Force \"C:\\ProgramData\\Docker\"\r\n    Remove-Item -Recurse -Force \"C:\\Program Files\\Docker\"\r\n    Remove-Item -Recurse -Force \"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Docker\"\r\n    Remove-Item -Force \"C:\\Users\\Public\\Desktop\\Docker for Windows.lnk\"\r\n    Get-ChildItem HKLM:\\software\\microsoft\\windows\\currentversion\\uninstall | % {Get-ItemProperty $_.PSPath}  | ? { $_.DisplayName -eq \"Docker\" } | Remove-Item -Recurse -Force\r\n    Get-ChildItem HKLM:\\software\\classes\\installer\\products | % {Get-ItemProperty $_.pspath} | ? { $_.ProductName -eq \"Docker\" } | Remove-Item -Recurse -Force\r\n    Get-Item 'HKLM:\\software\\Docker Inc.' | Remove-Item -Recurse -Force\r\n    Get-ItemProperty HKCU:\\software\\microsoft\\windows\\currentversion\\Run -name \"Docker for Windows\" | Remove-Item -Recurse -Force\r\n    #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\r\n    #Get-ItemProperty HKCU:\\software\\microsoft\\windows\\currentversion\\UFH\\SHC | Where-Object { $(Get-ItemPropertyValue $_) -Contains \"Docker\" }\r\n```"}}
{"actor":{"display_login":"ganeshdeshmukh1612"}}