snap uninstall docker code example
Example 1: Package 'docker-ce' is not installed, so not removed
sudo rm -rf /var/lib/docker /etc/docker
sudo rm /etc/apparmor.d/docker
sudo groupdel docker
sudo rm -rf /var/run/docker.sock
Example 2: Package 'docker-ce' is not installed, so not removed
dpkg -l | grep -i docker
Example 3: remove docker snap
sudo snap remove docker
Example 4: snap uninstall docker
for snap docker do - sudo snap remove docker