Docker is one of the most widely used containerization platforms. But there may come a time when you need to remove Docker from your system, maybe to free up space, switch to another version, or perform a clean reinstallation.
Before removing Docker, it’s recommended to stop all running containers:
docker container stop $(docker container ls -aq)
This ensures no container processes interfere with the uninstall.
To free up space, remove unused containers, images, networks, and volumes:
docker system prune -a --volumes-a removes all unused images.--volumes removes all volumes.⚠️ Warning: This deletes all Docker data permanently.
Remove the Docker packages installed on your system:
sudo apt purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras -yClean up unnecessary dependencies:
sudo apt autoremove -yDocker stores images, containers, and other runtime files in /var/lib/docker and /var/lib/containerd. To completely wipe Docker from your system:
sudo rm -rf /var/lib/{docker,containerd}Check if Docker has been removed:
docker --versionIf Docker was removed successfully, this command will return:
Command 'docker' not foundWhether you’re troubleshooting issues, switching versions, or simply no longer need Docker, these steps ensure a clean removal from your system.
Read More : Install Docker On Ubuntu
What is a Software Supply Chain Attack? A software supply chain attack occurs when a…
When people ask how UDP works, the simplest answer is this: UDP sends data quickly…
Endpoint Detection and Response (EDR) solutions have become a cornerstone of modern cybersecurity, designed to…
A large-scale malware campaign leveraging AI-assisted development techniques has been uncovered, revealing how attackers are…
How Does a Firewall Work Step by Step? What Is a Firewall and How Does…
People trying to securely connect to work are being tricked into doing the exact opposite.…