Search code examples
dockerubuntu-18.04snap

reinstall without snap but still looking for it


I deleted docker with:

sudo snap remove docker --purge

Then, I install docker following the doc guide (this)

All looks fine, but when I do:

$ docker -v
-bash: /snap/bin/docker: No such file or directory

It's like it still look for it in snap.

I tried:

$ sudo snap refresh --list

But doesn't work. Any idea?


Solution

  • It seems that the problem is for alias. try this command whereis docker the output is some thing like this:

    docker: /usr/bin/docker /etc/docker /usr/libexec/docker /usr/share/man/man1/docker.1.gz
    

    now set new alias to docker.

    alias docker='/usr/bin/docker'
    

    try again the problem should be solved.