Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to uninstall docker-engine?

Tags:

docker

I have installed the docker with

curl -sSL https://get.docker.com/ | sh

When I tried to uninstall the package, I am facing the following error

$ sudo apt-get remove docker-engine
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  docker-engine
0 upgraded, 0 newly installed, 1 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 28.5 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 454135 files and directories currently installed.)
Removing docker-engine (1.8.2-0~vivid) ...
Failed to stop docker.service: Unit docker.service not loaded.
invoke-rc.d: initscript docker, action "stop" failed.
dpkg: error processing package docker-engine (--remove):
 subprocess installed pre-removal script returned error exit status 5
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 docker-engine
E: Sub-process /usr/bin/dpkg returned an error code (1)

How am I to uninstall the docker package?

I am using Ubuntu 15.04.

like image 791
UnSat Avatar asked Oct 06 '15 15:10

UnSat


People also ask

How do I remove a docker engine from Windows?

To uninstall Docker Desktop from your Windows machine: From the Windows Start menu, select Settings > Apps > Apps & features. Select Docker Desktop from the Apps & features list and then select Uninstall. Click Uninstall to confirm your selection.

How do I uninstall docker?

Download Docker. Double-click InstallDocker. msi to run the installer. Follow the Install Wizard: accept the license, authorize the installer, and proceed with the install.

How do I fix my Docker engine?

Reinstalling and a system restart solved the issue.


2 Answers

Try it

sudo mv /var/lib/dpkg/info/{packagename}.* /tmp/
sudo dpkg --remove --force-remove-reinstreq {packagename}
sudo apt-get remove {packagename}
sudo apt-get autoremove && sudo apt-get autoclean
like image 102
user2912001 Avatar answered Sep 19 '22 19:09

user2912001


I had the same problem but in Ubuntu 14.04. The way that I resolve this problem was:

First remove bad links:

sudo mv /var/lib/dpkg/info/{packagename}.* /tmp/
sudo apt-get remove {packagename}

So now you can install it again:

sudo apt-get install docker-engine

Thats all.

like image 35
Manuel Morejón Avatar answered Sep 21 '22 19:09

Manuel Morejón