What is the complete method for uninstalling Docker?

To completely uninstall Docker, the following steps need to be executed:

  1. Please stop the docker service using sudo systemctl stop.
  2. Uninstall docker-ce, docker-ce-cli, and containerd.io using the command sudo apt-get purge.
  3. Please remove the directory /var/lib/docker using sudo.
  4. Remove the directory /etc/docker using superuser privileges.
  5. Remove all unused images, networks, and containers, including those not in use by any containers.

After completing the above steps, Docker will be completely uninstalled. If a non-default installation method was used during the installation process (such as using a script), then uninstallation needs to be done according to the corresponding method.

Leave a Reply 0

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


广告
Closing in 10 seconds
bannerAds