How to remove docker from Windows subsystem?

I tried to install Docker CE for Ubuntu in the Windows Subsystem for Linux, and I had trouble getting it to work properly. I discovered that perhaps Docker doesn’t work in WSL, so now I’m trying to remove it.

I’ve successfully removed GPG keys and Docker repo from apt, but I’m getting the following error when I try to remove the Docker package:

  ~ sudo apt-get --purge remove docker-ce Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED:   docker-ce* 0 upgraded, 0 newly installed, 1 to remove and 4 not upgraded. 1 not fully installed or removed. After this operation, 85.4 MB disk space will be freed. Do you want to continue? [Y/n] Y (Reading database ... 36248 files and directories currently installed.) Removing docker-ce (5:18.09.6~3-0~ubuntu-bionic) ... invoke-rc.d: could not determine current runlevel  * Stopping Docker: docker                                                                                              start-stop-daemon: warning: failed to kill 4129: No such process No process in pidfile '/var/run/docker-ssd.pid' found running; none killed. invoke-rc.d: initscript docker, action "stop" failed. dpkg: error processing package docker-ce (--remove):  installed docker-ce package pre-removal script subprocess returned error exit status 1 dpkg: error while cleaning up:  installed docker-ce package post-installation script subprocess returned error exit status 1 Errors were encountered while processing:  docker-ce E: Sub-process /usr/bin/dpkg returned an error code (1)