What is the procedure to uninstall Docker on CentOS?

To uninstall Docker on CentOS, you can follow these steps:

  1. Stop and delete all running containers.
sudo docker stop $(sudo docker ps -a -q)
sudo docker rm $(sudo docker ps -a -q)
  1. Remove all images.
sudo docker rmi $(sudo docker images -q)
  1. Uninstall the Docker package.
sudo yum remove docker-ce
  1. Remove Docker data directory (optional):
sudo rm -rf /var/lib/docker
  1. Remove Docker configuration file (optional):
sudo rm -rf /etc/docker

After completing the above steps, Docker has been completely uninstalled from the CentOS system.

Leave a Reply 0

Your email address will not be published. Required fields are marked *


广告
Closing in 10 seconds
bannerAds