fully uninstall docker ubuntu code example
Example 1: Package 'docker-ce' is not installed, so not removed
sudo apt-get purge -y docker-engine docker docker.io docker-ce docker-ce-cli
sudo apt-get autoremove -y --purge docker-engine docker docker.io docker-ce
Example 2: Package 'docker-ce' is not installed, so not removed
dpkg -l | grep -i docker