我在我的Unix机器上安装了Docker,它不能正常工作,所以我尝试卸载它以再次运行这些步骤。我在这里遵循了卸载步骤,https://docs.docker.com/engine/install/ubuntu/#supported-storage-drivers
但是我收到了这个错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
pigz slirp4netns
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
containerd.io* docker-ce* docker-ce-cli*
0 upgraded, 0 newly installed, 3 to remove and 138 not upgraded.
After this operation, 424 MB disk space will be freed.
(Reading database ... 73672 files and directories currently installed.)
Removing docker-ce (5:20.10.3~3-0~ubuntu-focal) ...
invoke-rc.d: could not determine current runlevel
* Stopping Docker: docker start-stop-daemon: warning: failed to kill 11177: 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: too many errors, stopping
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
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
我应该如何删除所有的码头文件?
发布于 2021-02-23 19:58:13
这可能与GitHub发布在这里。上的问题有关。
问题与行有关。
invoke-rc.d: could not determine current runlevel
您是否可以尝试再次卸载,作为纯根?
sudo su
然后尝试移除。如果问题仍然发生,还有另外一种与/etc/init.d/ebtables
相关的解决方案。由于某种原因,运行级不可用。建议的解决方案如下所示修改该文件:
case "$1" in
start)
[ "$EBTABLES_LOAD_ON_START" = "yes" ] && load
;;
stop)
[ "$EBTABLES_SAVE_ON_STOP" = "yes" ] && save
clear
;;
评论如下:
stop)
# [ "$EBTABLES_SAVE_ON_STOP" = "yes" ] && save
# clear
;;
发布于 2021-02-23 18:37:15
要完全卸载docker,请执行以下命令:
dpkg -l | grep -i docker
sudo apt-get purge -y docker-engine docker docker.io docker-ce docker-ce-cli
sudo apt-get autoremove -y --purge docker-engine docker docker.io docker-ce
这些命令不会删除用户创建的配置文件的图像、容器、卷等。所以在删除之前先删除这些东西。为了删除这些内容,您可以遵循以下命令:
docker rm -f (docker ps -a | awk '{print$1}')
:删除计算机中可用的所有码头容器docker rmi -f $(docker images -a -q)
:删除所有图像,但在此之前,您应该删除从该映像中创建的所有容器docker rm -vf $(docker ps -a -q)
:删除所有容器,包括其卷用途https://stackoverflow.com/questions/66338203
复制相似问题