I have an issue with my docker installation in which DNS resolution is not working within my containers. How can I safely reinstall docker on Ubuntu 16.04 without removing existing volumes?
2 Answers. All the data is in /var/lib/docker . However, this data will not be removed when uninstalling the packages.
To clean this up, you can use the docker container prune command. By default, you are prompted to continue. To bypass the prompt, use the -f or --force flag. Other filtering expressions are available.
It turns out that when uninstalling docker using apt, the /var/lib/docker
directory remains untouched, and the volumes will stay intact.
You can simply run apt-get remove docker-ce
to uninstall docker without removing your volumes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With