Before uninstalling docker, use the systemctl or service command to stop and disable docker.
The yum command can be used to uninstall Docker on Linux CentOS.
yum remove docker
By default, the Docker binaries will be located below /etc/docker, and there will be some files left behind. If you want, you can blow away the /etc/docker directory.
rm -rf /etc/docker