sudo apt remove docker.io
报错如下:
Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: aufs-tools Use 'sudo apt autoremove' to remove it. The following packages will be REMOVED: docker.io* 0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded. 1 not fully installed or removed. After this operation, 29.1 MB disk space will be freed. Do you want to continue? [Y/n] Y (Reading database ... 29980 files and directories currently installed.) Removing docker.io (1.6.2~dfsg1-1ubuntu4~14.04.1) ... invoke-rc.d: could not determine current runlevel * Stopping Docker: docker
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.io (--remove): installed docker.io package pre-removal script subprocess returned error exit status 1 dpkg: error while cleaning up: installed docker.io package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: docker.io E: Sub-process /usr/bin/dpkg returned an error code (1)
解决办法:
sudo rm -rf /var/lib/dpkg/info/docker.io.*
In /var/lib/dpkg/info/
,find file like docker.io.*
,and delete them all,then redo the remove action,it will be ok.
I just remove the openssh-server and solvethe same problem,I hope it helps.
安装最新docker
参考资料