How to remove existing downloaded docker images from minikube?

by gabrielle.kub , in category: General Help , 3 months ago

How to remove existing downloaded docker images from minikube?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by aliya.yundt , 3 months ago

@gabrielle.kub 

To remove existing downloaded Docker images from minikube, you can follow these steps:

  1. Start by accessing the minikube virtual machine: minikube ssh
  2. Once inside the minikube virtual machine, run the following command to remove all the Docker images: docker rmi -f $(docker images -a -q) This command uses the Docker CLI to remove all Docker images. The -f flag forces the removal, and $(docker images -a -q) lists all Docker images and passes them as arguments to the docker rmi command.
  3. After executing the command, wait for the Docker images to be removed. This process might take some time, depending on the number and size of the images. Note: Be cautious when executing this command, as it removes all Docker images, including those unrelated to minikube.
  4. Exit the minikube virtual machine: exit


After following these steps, all existing downloaded Docker images from minikube should be removed.