Now if you just want to do a simple uninstall just type in this command;
$ sudo apt-get purge docker-ce
For a complete uninstall of Docker follow the below steps:
Step 1:This command will tell you all the docker related packages you have installed:
$ dpkg -l | grep -i docker
Step 2: The below commands remove everything but containers,images,volumes, user configurations.
$ sudo apt-get purge -y docker-engine docker docker.io docker-ce
$ sudo apt-get autoremove -y --purge docker-engine docker docker.io docker-ce
Step 3: Run these commands to remove all containers,images,volumes, user configurations.
$ sudo rm -rf /var/lib/docker /etc/docker
$ sudo rm /etc/apparmor.d/docker
$ sudo groupdel docker
$ sudo rm -rf /var/run/docker.sock
That should have removed everything related to docker.
Hope this helped :)
Want to become more proficient in docker? make sure to check out docker training course.