Minikube
Mac
uninstall minikube
MacOS
Kubernetes

How do I uninstall minikube on a Mac?

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

Introduction

Uninstalling Minikube on macOS is straightforward, but partial cleanup often leaves stale Kubernetes contexts, cached images, and driver artifacts behind. A complete removal is useful when troubleshooting cluster issues or preparing a clean reinstall. This guide walks through safe shutdown, binary removal, config cleanup, and verification.

Stop Minikube and Remove Local Profiles

Before deleting files, stop active clusters and remove Minikube-managed state. This prevents leftover virtual machines or containers from consuming resources.

bash
1#!/usr/bin/env bash
2set -euo pipefail
3
4if command -v minikube >/dev/null 2>&1; then
5  minikube status || true
6  minikube stop || true
7  minikube delete --all --purge || true
8fi

--all --purge clears local profiles and most related Minikube state. Running this first avoids orphaned components.

How you installed Minikube determines removal steps. For Homebrew installations, uninstall with brew. For manual installations, remove the binary directly.

bash
1#!/usr/bin/env bash
2set -euo pipefail
3
4if brew list minikube >/dev/null 2>&1; then
5  brew uninstall minikube
6fi
7
8# Optional manual cleanup if a direct binary exists
9sudo rm -f /usr/local/bin/minikube
10sudo rm -f /opt/homebrew/bin/minikube

Check removal with:

bash
command -v minikube || echo "minikube removed"

Clean Kubernetes Context and Config Residue

Minikube adds contexts and certificates to kubeconfig. If you no longer need local cluster references, remove those entries to keep kubectl clean.

bash
1#!/usr/bin/env bash
2set -euo pipefail
3
4# Remove minikube context, user, and cluster if present
5kubectl config delete-context minikube || true
6kubectl config delete-cluster minikube || true
7kubectl config unset users.minikube || true
8
9# Remove residual config directories
10rm -rf ~/.minikube
11rm -rf ~/.kube/cache

If you manage multiple kubeconfig files, inspect KUBECONFIG before deleting anything globally.

Remove Driver-Specific Artifacts

Minikube can run on Docker, HyperKit, VirtualBox, and other drivers. Driver cleanup depends on what your environment used.

For Docker driver:

  • remove stray containers and networks created for Minikube
  • prune unused images if disk pressure is high

Example:

bash
docker ps -a --filter "name=minikube"
docker rm -f $(docker ps -aq --filter "name=minikube") 2>/dev/null || true
docker network ls | rg minikube || true

For VirtualBox driver, remove any leftover virtual machine entries through VirtualBox Manager or CLI. For HyperKit-based setups, inspect local virtualization caches and remove only resources tied to Minikube.

Verify Complete Removal

Run a short verification checklist so you know cleanup is complete:

bash
1#!/usr/bin/env bash
2set -euo pipefail
3
4echo "Binary check"
5command -v minikube || true
6
7echo "Context check"
8kubectl config get-contexts || true
9
10echo "Directory check"
11test -d ~/.minikube && echo "~/.minikube still exists" || echo "~/.minikube removed"

If the minikube context still appears, inspect all kubeconfig files in your environment and remove duplicates manually.

Reinstall Preparation Tips

If you plan to reinstall:

  • choose one driver and keep it consistent
  • pin Minikube and Kubernetes versions for reproducibility
  • script initial setup so future rebuilds are one command

This reduces setup drift across machines and avoids repeat uninstall cycles.

Common Pitfalls

  • Deleting the binary first and forgetting to run minikube delete --all --purge.
  • Removing shared ~/.kube/config entries without checking for non-Minikube clusters.
  • Keeping old driver resources alive, which still consume CPU or disk.
  • Mixing installation methods and missing one binary path during cleanup.
  • Assuming uninstall is complete without validating contexts and directories.

Summary

  • Stop and purge Minikube profiles before removing binaries.
  • Uninstall according to installation method, then verify binary absence.
  • Clean kubeconfig entries and Minikube directories to avoid stale context issues.
  • Remove driver-specific artifacts if local resources remain allocated.
  • Use a short verification script to confirm full uninstall.

Related reading
Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

All Rights Reserved.