How to remove Docker completely from Ubuntu?

Published: 04 March 2023
on channel: TS
1,738
15

1. Stop all running Docker containers by running the following command:
sudo docker stop $(sudo docker ps -aq)

2. Remove all Docker containers by running the following command:
sudo docker rm $(sudo docker ps -aq)

3. Remove all Docker images by running the following command:
sudo docker rmi $(sudo docker images -aq)

4. Uninstall Docker CE by running the following command:
sudo apt-get purge docker-ce

5. Remove any remaining Docker packages and dependencies by running the following command:
sudo apt-get autoremove --purge docker-ce

6. Remove the Docker directory and all its contents by running the following command:
sudo rm -rf /var/lib/docker


Watch video How to remove Docker completely from Ubuntu? online without registration, duration hours minute second in high quality. This video was added by user TS 04 March 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,738 once and liked it 15 people.