ec2 uninstall docker 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
sudo rm -rf /var/lib/docker /etc/docker
sudo rm /etc/apparmor.d/docker
sudo groupdel docker
sudo rm -rf /var/run/docker.sock