Docker installed, but cannot run hello-world on Ubuntu 20.04 LTS

I initially was running docker as a snap, but had some difficulty with it. I removed the snap, and then installed by following the instructions here:

I can run things like “docker ps”, which finds nothing because I have worked at deleting all references and config files for docker, but it works. However, when I try to run hello-world I get an error.
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
$ docker run hello-world
Unable to find image ‘hello-world:latest’ locally
docker: Error response from daemon: Get “https://registry-1.docker.io/v2/”: Bad Request.
See ‘docker run --help’.

Note that I get the exact same error if I attempt to login to DockerHub using a PAT. I would show the error, but as a new user I’m only allowed to put two links in a post.

I have attempted several times to purge everything and reinstall, but I continue to get this error.

Thank you

I finally solved the issue. There were old versions of docker.service and docker.socket files in /etc/systemd/system/

ls -l /etc/systemd/system/ | grep docker

-rw-r----- 1 root root 1709 Jan 16 17:48 docker.service
drwxr-x— 2 root root 4096 Jan 16 18:05 docker.service.d/
-rw-r----- 1 root root 295 Jan 16 17:48 docker.socket[Service]

After removing these and doing a clean install, Docker works.