The docker - Your app transporter

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


Surendra-MacBook-Pro in ~
○ → boot2docker stop

 Surendra-MacBook-Pro in ~
○ → echo $?

Step2: Delete boot2docker package by using delete option as shown below

boot2docker delete

 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}

 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 script from my channel.

The following two tabs change content below.
Mr Surendra Anne is from Vijayawada, Andhra Pradesh, India. He is a Linux/Open source supporter who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. He works as Devops Engineer with Taggle systems, an IOT automatic water metering company, Sydney . You can contact him at surendra (@) linuxnix dot com.