Uninstall Docker
- Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:
student@ubuntu:~$ sudo apt-get purge docker-ce docker-ce-cli containerd.io
docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
libatasmart4 libblockdev-fs2 libblockdev-loop2 libblockdev-part-err2
libblockdev-part2 libblockdev-swap2 libblockdev-utils2 libblockdev2
libmbim-glib4 libmbim-proxy libmm-glib0 libnspr4
libnss3 libnuma1 libparted-fs-resize0 libqmi-glib5 libqmi-proxy
libudisks2-0 libxmlb2 pigz slirp4netns usb-modeswitch usb-modeswitch-data
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
containerd.io* docker-buildx-plugin* docker-ce* docker-ce-cli*
docker-ce-rootless-extras* docker-compose-plugin*
0 upgraded, 0 newly installed, 6 to remove and 10 not upgraded.
After this operation, 410 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 62643 files and directories currently installed.)
Removing docker-ce-rootless-extras (5:24.0.7-1~ubuntu.20.04~focal) ...
Removing docker-ce (5:24.0.7-1~ubuntu.20.04~focal) ...
<Output Trucncated>
- Images, containers, volumes, or custom configuration files on your host aren’t automatically removed.
To delete all images, containers, and volumes, run:
student@ubuntu:~$ sudo rm -rf /var/lib/docker
student@ubuntu:~$ sudo rm -rf /var/lib/containerd