Purge Docker & Components

It might be helpful to purge Docker and all its components before performing a fresh installation of Helmut4 using its install script. This is particularly important if Docker and Portainer were previously installed, as this can lead to execution errors with the default install script.

Delete Stacks

sudo docker stack ls
sudo docker stack rm helmut

Stop & Delete Container

sudo docker ps
sudo docker stop <containerID>
sudo docker rm <containerID>


docker rmi -f $(docker images -aq) 

Delete Container Volumes

sudo docker volume ls
sudo docker volume rm portainer_data
sudo docker volume rm helmut4_mcc_mongodb

Uninstall Docker Engine

sudo apt-get purge -y docker-engine docker docker.io docker-ce docker-ce-cli docker-compose-plugin docker-compose
sudo apt-get autoremove -y --purge docker-engine docker docker.io docker-ce docker-compose-plugin docker-compose

Note: not all folders might be available, if so ignore the error message

sudo rm -rf /var/lib/docker /etc/docker
sudo rm /etc/apparmor.d/docker
sudo groupdel docker
sudo rm -rf /var/run/docker.sock
sudo rm -rf /var/lib/containerd
sudo rm -r ~/.docker

Check for missing Docker components

dpkg -l | grep -i docker

Delete misc Docker source lists

sudo rm /etc/apt/sources.list.d/archive_uri-https_download_docker_com_linux_*
sudo rm /etc/apt/sources.list.d/docker.list

Last updated