Blog

Uninstall Docker on Ubuntu

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.

Step 1: Stop Running Containers

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.

Step 2: Remove Docker Containers, Images, and Volumes

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.

Step 3: Uninstall Docker Packages

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 -y

Step 4: Remove Dependencies

Clean up unnecessary dependencies:

sudo apt autoremove -y

Step 5: Delete Docker Data Directories

Docker 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}

Step 6: Verify Removal

Check if Docker has been removed:

docker --version

If Docker was removed successfully, this command will return:

Command 'docker' not found

Conclusion

Whether 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

0xSnow

0xSnow is a cybersecurity researcher with a focus on both offensive and defensive security. Working with ethical hacking, threat detection, Linux tools, and adversary simulation, 0xSnow explores vulnerabilities, attack chains, and mitigation strategies. Passionate about OSINT, malware analysis, and red/blue team tactics, 0xSnow shares detailed research, technical walkthroughs, and security tool insights to support the infosec community.

Recent Posts

How to Install Docker on Ubuntu (Step-by-Step Guide)

Docker is a powerful open-source containerization platform that allows developers to build, test, and deploy…

20 minutes ago

Admin Panel Dorks : A Complete List of Google Dorks

Introduction Google Dorking is a technique where advanced search operators are used to uncover information…

1 day ago

Log Analysis Fundamentals

Introduction In cybersecurity and IT operations, logging fundamentals form the backbone of monitoring, forensics, and…

2 days ago

Networking Devices 101: Understanding Routers, Switches, Hubs, and More

What is Networking? Networking brings together devices like computers, servers, routers, and switches so they…

3 days ago

Sock Puppets in OSINT: How to Build and Use Research Accounts

Introduction In the world of Open Source Intelligence (OSINT), anonymity and operational security (OPSEC) are…

3 days ago

What is SIEM? Complete Guide to Security Information and Event Management

Introduction As cyber threats grow more sophisticated, organizations need more than just firewalls and antivirus…

3 days ago