Why?
Well, say you were messing around with settings, and things went REALLY wrong. Like a simple uninstall and reinstall didn’t work - Or you are done testing things out and want it ALL gone.
This goes MUCH deeper than a simple apt uninstall. This could be considered the nuclear option, but it works.
The commands
Check which docker packages are installed.
| |
Then remove them all. You may need to add to this list (using names from the first command). On a relatively clean install: it’ll probably cover everything.
| |
Or, if you installed with snap:
| |
To delete images, containers, volumes, and other user-created config files on the host, run:
| |
Then for some leftover files:
| |
Stubborn files
To find other (possible) leftover files, use the find command and delete them manually:
| |
RESTART!
Restart your server to get rid of anything else that could be leftover and running.
| |
These commands were based on a few responses and comments on the askubuntu forum