Be careful when you use these two flags together. It will ignore non-existent files, and never prompt before removing them. So the rm command can remove all the children folders and files of the target folder recursively. The “-rf ” flag is a combination of the “-r” and “-f” flags. This is how: sudo rm -rf /var/lib/docker /etc/docker Remove all the Docker related filesĪfter that, you might want to remove all the Docker images, containers, volumes, and configurations. Then you’ll see prompts like the following and you have to manually answer yes or y for every package. The “-y” flag here is to answer “yes” to the command prompt when it asks you whether to remove a package. Sudo apt-get autoremove -y -purge docker-engine docker docker.io docker-ce For example: sudo apt-get purge -y docker-engine docker docker.io docker-ce docker-ce-cli If you have more docker packages installed, you can add those packages names to the end of the commands above. sudo apt-get purge -y docker-ce docker-ce-cli sudo apt-get autoremove -y -purge docker-ce docker-ce-cli Remove the packagesįor me, I’ve only installed docker-ce and docker-ce-cli. The above command is basically saying, give me a list of packages that contains the word “docker” in them. Since Raspberry Pi OS is also a descendant of Debian, this will work just fine. Just like apt-get in Ubuntu, a Linux distro based on Debian. The dpkg command is a package management command in Debian. Identify which Docker package have you installed dpkg -l | grep -i docker For example, I’ve installed docker-ce and docker-ce-cli I also added some explanation to some of the commands so you will have a better understanding of what they’re doing. Credit goes to Mayur Bhandare on Stack Exchange. This is a simple note to myself of how to remove Docker from Ubuntu or Raspberry Pi OS (previously called Raspbian).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |