I installed a docker-ce (version 18.06) in my Ubuntu 16.04 from binary which introduced in this page1.
Now I want to remove it and reinstall docker-ce by apt.
But I don't know how to remove it...
I just know remove the things which I copy to /usr/bin..
Any other thing should I do?
Thanks!
First, stop dockerd: sudo systemctl stop docker
Then, remove the docker binaries you've installed. If you copied the binaries to /usr/bin then sudo rm /usr/bin/docker*
Related
I have been struggling with the issue of "docker" command not being recognized in Windows cmd. I have docker installed on Windows Pro, and it is running ok, but the "docker" command is not recognized though the PATH variable contain the location of the docker binaries.
Any ideas on this, please? I have been looking everywhere, but could not find a solution!
Thanks.
I encontered the same problem. In my case (linux) it was because of broken installations. I've ran sudo apt --fix-broken install && sudo apt install docker-ce docker-ce-cli containerd.io
(Windows): I did not use my PC for a year, and got the same error after running docker --version. I just upgraded to the latest docker version, and issue resolved.
Today I upgraded docker from 18.06 to 18.09 in a debian stretch host. After the upgrade all our images and container were "gone", i.e. docker <command> won't show them anymore but the data in /var/lib/docker wasn't gone. dockerd -D unveiled:
Cannot load container XXX because it was created with another graph driver
So the first thing I did was downgrade docker to the last version to check if that fixes it. It worked kind of. The systemd unit file which worked before failed to start the docker service. Turns out I have to explicitly pass -s devicemapper to dockerd now and I don't know why because apparently the upgrade to 18.09 did put /var/lib/docker/overlay2 which I simply had to remove to make 18.06 startup as before.
So after I confirmed that this is fixed with the last docker-version, I upgraded again to 18.09 and tried if passing -s devicemapper explicitly does the trick here. But with 18.09 the daemon won't even start at all and complains:
Failed to GetDriver graph driver=devicemapper error="graphdriver plugins are only supported with experimental mode" home-dir=/var/lib/docker
I can't find anything about devicemapper being deprecated or something like that, so what were I supposed to do before the upgrade? Is there any general advice/best practice to avoid issues like that?
In case it is of help to anyone. I had to nuke the 18.09 release that was pulled in through the update channel for my mint installation:
sudo apt-get autoremove docker-ce
sudo rm -rf /etc/docker
sudo rm -rf /var/lib/docker
sudo apt-get autoremove --purge docker-ce
Then reinstall before getting a working 18.09 docker install back:
sudo apt-get install docker-ce
This moved my storage driver to Storage Driver: overlay2 when it was previously devicemapper, which seems to be the root of the issue.
There's no doubt a solution to this via /etc/docker/daemon.json settings, but I haven't got time to figure out what that is unfortunately.
Clearly, you'll lose all your local Docker images if you nuke /var/lib/docker, so make sure you want to do that before cut-n-pasting.
And yes, the original question should probably have been posted to SU and not SO...
After several problems, I decided to purge Docker to reinstall it in a second time. Here's the steps that I did to purge all the packages related to Docker:
- dpkg -l | grep -i docker
- sudo apt-get purge docker-engine docker docker-compose
- sudo apt-get autoremove --purge docker docker-compose docker-engin
I even delete the folder which contains Docker files and containters /var/lib/docker
But I still display the docker version after all I did.
docker -v
Docker version 17.06.2-ce, build a04f55b
EDIT : This solution is for systems using Debian packages (Debian, Ubuntu, Mint, ...).
You saw that the docker binary is still present in your system.
You can locate it using the whereis command :
# whereis docker
docker: /usr/bin/docker /usr/lib/docker /etc/docker /usr/share/man/man1/docker.1.gz
Now that the binary is located (it's /usr/bin/docker in the example) you can use the dpkg -S <location> to look for its package. See related post.
# dpkg -S /usr/bin/docker
docker-ce: /usr/bin/docker
And then you can get rid of the package (here docker-ce) using your usual tools (apt-get purge, or dpkg -r if the package was not installed through a repository).
That version number looks like the last release of the snap package. If you installed by snap, then the uninstall uses the same tool:
sudo snap remove docker
OS: Ubuntu 16.04
Docker version: 1.11.2
I have already installed docker 1.11.2 on my Ubuntu and I want to upgrade it to 1.12. All the steps are as follows:
I download the deb pkg named docker-engine_1.12.3-0~xenial_amd64.
Execute command: dpkg -i docker-engine_1.12.3-0~xenial_amd64 but notes with errors:
docker-engine conficts with docker.io.docker.io (version 1.11.2-0ubuntu5~16.04) has already been installed .
So I have to remove docker first by using commands as below:
service docker stop
apt-get remove docker
apt-get remove --auto-remove docker
rm -rf /var/lib/docker
Go to step 2, but with the same errors.
So, I hope someone would help me solve this problem.
The conflicting packages (which fight over the same binary) are docker.io (from the distribution) and docker-engine (from Docker itself).
Your command above does apt-get remove ... docker. Which achieve nothing for the aforementioned problem.
I have different machines running 16.04 and some use docker.io (easier, no extra repo) whereas others use docker-engine. I am indifferent. Pick on, docker should work just fine.
Firstly restart the ubuntu server with linux command(sudo shutdown -r now), and run the command : apt-get -f install(this command is suggested by the error information), then I install the docker-engine by the following site(https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04).
CentOS version: lsb_release -d
Description: CentOS release 6.5 (Final)
My repo looks like this
cat /etc/yum.repos.d/docker.repo
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
I have some old version of docker and when I try to install it, I get an error. When I try the skip option, even after that the docker service does not even exist on my centos yum install docker-engine has the following problem
Processing Conflict: docker-engine-1.7.1-1.el6.x86_64 conflicts docker-io
--> Finished Dependency Resolution
Error: docker-engine conflicts with docker-io-0.6.2-1.el6.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest"
Then service docker start does not exist when I try to start it.
How do I do clean of all docker stuff and do this from scratch?
Docker's official release no longer supports RHEL/Centos 6. I think that stopped with 1.7.1 and the official release is at 1.10. I would suggest updating to Centos 7 or anything with a 3.10+ kernel to use the latest docker-engine as it has improved quite a bit.
If you are stuck with Centos 6.5 then either continue with the the EPEL docker-io package or install the 1.7.1 rpm.
Completely remove the Centos 6 package
yum remove docker-io
Remove all docker data (and never get it back!)
rm -rf /var/lib/docker
Remove the Docker repo config
rm /etc/yum.repos.d/docker.repo
Either install docker-io again
yum install docker-io
Or install the docker-engine-1.7.1 rpm
yum install http://yum.dockerproject.org/repo/main/centos/6/Packages/docker-engine-1.7.1-1.el6.x86_64.rpm
Start it and docker
service docker start
docker run hello-world