If your docker is not working fine and you want to reinstall it then this post is for you. This will show how to remove docker completly either manually or through a basic shell script.
Step1: Stop boot2docker service if it is already running
boot2docker stop
Example:
Surendra-MacBook-Pro in ~
○ → boot2docker stop
Surendra-MacBook-Pro in ~
○ → echo $?
0
Step2: Delete boot2docker package by using delete option as shown below
boot2docker delete
Example
Surendra-MacBook-Pro in ~
○ → boot2docker delete
Step3: Remove manually some of the files and directories
sudo rm /usr/local/bin/docker
sudo rm /usr/local/bin/boot2docker
sudo rm -rf /usr/local/share/boot2docker/
rm -rf ~/.boot2docker/
rm -rf ~/.ssh/boot2docker{,.pub}
Example:
Surendra-MacBook-Pro in ~
○ → sudo rm /usr/local/bin/docker
override rwxr-xr-x root/wheel for /usr/local/bin/docker? y
Surendra-MacBook-Pro in ~
○ → sudo rm /usr/local/bin/boot2docker
override rwxr-xr-x root/wheel for /usr/local/bin/boot2docker? y
Surendra-MacBook-Pro in ~
○ → sudo rm /usr/local/share/boot2docker/boot2docker.iso
override rw-r–r– root/wheel for /usr/local/share/boot2docker/boot2docker.iso? y
Surendra-MacBook-Pro in ~
○ → sudo rm -rf /usr/local/share/boot2docker/
Surendra-MacBook-Pro in ~
○ → rm -rf .boot2docker/
We can automate this, just download uninstall-docker.sh script from my github.com channel.
Latest posts by Surendra Anne (see all)
- Docker: How to copy files to/from docker container - June 30, 2020
- Anisble: ERROR! unexpected parameter type in action:
Fix - June 29, 2020 - FREE: JOIN OUR DEVOPS TELEGRAM GROUPS - August 2, 2019
- Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) - August 27, 2018
- How to use ohai/chef-shell to get node attributes - July 19, 2018