sudo apt purge docker-engine docker
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-57 linux-headers-4.4.0-57-generic
linux-image-4.4.0-57-generic linux-image-extra-4.4.0-57-generic
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
docker* docker-engine*
0 upgraded, 0 newly installed, 2 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 65.5 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 254065 files and directories currently installed.)
Removing docker (1.5-1) ...
Purging configuration files for docker (1.5-1) ...
Removing docker-engine (1.13.0-0~ubuntu-xenial) ...
Purging configuration files for docker-engine (1.13.0-0~ubuntu-xenial) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up docker.io (1.12.3-0ubuntu4~16.04.2) ...
addgroup: The group `docker' already exists as a system group. Exiting.
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
dpkg: error processing package docker.io (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)