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.
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.
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.
Reinstalling and a system restart solved the issue.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With