minikube
error
no space left
localkube
troubleshooting

minikube error - scp /usr/local/bin/localkube No space left on device

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

Introduction

This Minikube error usually means the machine or VM that Minikube is copying files into has run out of usable disk space. Even though the message mentions localkube, the real issue is almost always storage exhaustion rather than a broken SCP command.

Understand What The Error Is Telling You

The message:

text
scp: /usr/local/bin/localkube: No space left on device

means Minikube tried to copy a Kubernetes-related binary into the target environment and the target filesystem could not accept any more data. In older Minikube setups the copied binary was often localkube, which is why that name still appears in many error reports.

The important question is not "why SCP?" but "which disk is full?" Depending on your driver, that could mean:

  • the host machine is out of space
  • the Minikube VM disk is out of space
  • Docker or container runtime storage is full
  • cached images and old clusters have consumed the available disk

Check The Host First

Start by checking free space on the host machine:

bash
df -h
du -sh ~/.minikube ~/.kube 2>/dev/null

If the root filesystem or home directory is nearly full, Minikube may fail before the cluster is even usable. Large Docker images, old build artifacts, and stale package caches are common causes.

If you are using Docker as the Minikube driver, also inspect Docker storage:

bash
docker system df

That often reveals unused images, containers, and volumes consuming far more space than expected.

Check The Minikube Environment Itself

If the host looks healthy, inspect the Minikube node or VM:

bash
minikube ssh -- df -h

This tells you whether the internal filesystem used by the Minikube node is full. That is especially common after repeated cluster restarts, image builds, or package downloads inside the node.

If the node is already broken enough that minikube ssh does not work, deleting and recreating the cluster is often faster than trying to repair a badly constrained local VM.

Clean Up Old State

A practical fix is often to remove stale Minikube state and old container artifacts.

Delete the current cluster:

bash
minikube delete

Clear old caches if they are no longer needed:

bash
minikube cache delete

If Docker storage is the real culprit, reclaim space there too:

bash
docker system prune -a

Be careful with that last command. It removes unused images and other resources, so it is useful for freeing space but should not be run blindly on a machine that hosts other important container workloads.

Recreate The Cluster With More Disk

If cleanup helps only temporarily, recreate Minikube with a larger disk allocation:

bash
minikube start --disk-size=30g

This is often the correct long-term fix for local Kubernetes environments that pull many images or build application containers repeatedly.

If you are using a VM-based driver, the relevant disk limit lives inside the Minikube VM configuration. If you are using a container driver, the pressure may come more from Docker or the host filesystem.

Keep The Error In Historical Context

The mention of localkube can be misleading because newer Minikube versions do not revolve around that old binary in the same way. The storage diagnosis still applies. The exact internal artifact has changed over time, but "no space left on device" still means you need to find which layer has exhausted disk.

That is why many fixes on old forum threads still boil down to the same steps today: inspect space, clean old state, and increase disk where necessary.

Common Pitfalls

  • Assuming the SCP command itself is the root cause instead of a storage problem.
  • Checking only the host filesystem when the Minikube VM or container disk is actually full.
  • Repeatedly retrying minikube start without deleting broken local state.
  • Forgetting that Docker image storage can exhaust space even when Minikube files look small.
  • Treating the word localkube as the main issue instead of recognizing it as an older internal detail.

Summary

  • The error means Minikube ran out of writable disk space somewhere in the host or node environment.
  • Check both the host with df -h and the Minikube node with minikube ssh -- df -h.
  • Clean stale clusters, caches, and unused container artifacts when appropriate.
  • If the environment regularly runs out of room, recreate Minikube with a larger disk allocation.

Course illustration
Course illustration

All Rights Reserved.