Skip to content

Instantly share code, notes, and snippets.

@zhangludi
Created April 23, 2019 01:43
Show Gist options
  • Save zhangludi/7cae19fb0e22f16ae4cd576e2151d0de to your computer and use it in GitHub Desktop.
Save zhangludi/7cae19fb0e22f16ae4cd576e2151d0de to your computer and use it in GitHub Desktop.
卸载docker
CentOS下yum命令出现Loaded plugins: fastestmirror
fastestmirror是yum的一个加速插件,这里是插件提示信息是插件不能用了。
步骤:
1.修改插件的配置文件
# vi /etc/yum/pluginconf.d/fastestmirror.conf
【Tips】:用Tab可补全
将enabled=1改为enabled=0
2.修改yum的配置文件
# vi /etc/yum.conf
将plugins=1改为plugins=0
【注】以上操作需要切换到root用户下,否则会出现vim e505:read only 和vim e212错误
3.reboot
#########################################################################################
Centos 7 如何卸载docker
1首先搜索已经安装的docker 安装包
[root@localhost ~]# yum list installed|grep docker
或者使用该命令
[root@localhost ~]# rpm -qa|grep docker
docker.x86_64 2:1.12.6-16.el7.centos @extras
docker-client.x86_64 2:1.12.6-16.el7.centos @extras
docker-common.x86_64 2:1.12.6-16.el7.centos @extra
2 分别删除安装包
[root@localhost ~]#yum –y remove docker.x86_64
[root@localhost ~]#yum –y remove docker-client.x86_64
[root@localhost ~]#yum –y remove docker-common.x86_64
3 删除docker 镜像
[root@localhost ~]# rm -rf /var/lib/docker
4 再次check docker是否已经卸载成功
[root@localhost ~]# rm -rf /var/lib/docker
[root@localhost ~]#
如果没有搜索到,那么表示已经卸载成功。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment