Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker: Where is "reset to factory defaults" on linux?

Tags:

linux

docker

I've used Docker on Windows and macOS for the past couple years. Often, when things got really messed up, I found it faster to use the Reset to factory defaults option in the Docker GUI to do a clean reset than to troubleshoot whatever problem was giving me grief.

Now I'm using Ubuntu 20.04 and I can't find this option. I found a long list of commands to remove/reset individual components but where is the single command for this like Windows/macOS?

like image 865
Patrick Kenny Avatar asked Jun 03 '20 13:06

Patrick Kenny


People also ask

How do I view desktop logs in Docker?

You can also find the logs for the internal components included in Docker Desktop at $HOME/. docker/desktop/log/ .

What Docker is my image running?

You can check with this command systemctl status docker it will show the status of the docker. If you want to start you can use systemctl start docker instead of systemctl you can try also with service , service docker status and service docker start respectively.


Video Answer


1 Answers

Use your OS's package manager to uninstall the Docker package; then

sudo rm -rf /var/lib/docker

That should completely undo all Docker-related things.

Note that the "Desktop" applications have many more settings (VM disk/memory size, embedded Kubernetes, ...). The native-Linux Docker installations tend to have very few, and generally the only way to set them is by directly editing the JSON configuration file in /etc. So "reset Docker" doesn't really tend to be an issue on native Linux.

As always, make sure you have an external copy of your images (in Docker Hub or a registry like ECR) or you can rebuild them from Dockerfiles, your containers are designed to tolerate being deleted and recreated, and if you use named volumes, you have backups of those.

like image 59
David Maze Avatar answered Sep 23 '22 07:09

David Maze