Not enough space on the FS error

Ubuntu Support Template

Ubuntu Version:
24.04

Desktop Environment (if applicable):
na

Problem Description:
I am trying to create a docker image with the following command: docker build -t test_ollama . and get this error: At least 1938MB more space needed on the / filesystem.. When I do a df . -h, I get the following: Size: 97g, Used: 40G Avail: 53G Use: 44%.

Is that output from: df -h /
Do you have only one partition for your Ubuntu install? If you have more than 1 partition, what is the location where you are attempting the build?

1 Like

Although df -h shows plenty of free space on /, Docker may be using a separate or constrained filesystem.

Possible causes:

  • Docker’s storage directory (/var/lib/docker) is on a partition with limited space
  • Old Docker images, layers, or containers consuming the storage
  • Docker running inside a VM / container / WSL with a smaller virtual disk
  • Overlay filesystem or inode exhaustion

How to investigate:

  1. Check where Docker stores its data:

    docker info | grep -E "Docker Root Dir|Storage Driver"
    
  2. Verify available space on Docker’s filesystem:

    df -h /var/lib/docker
    
  3. See what Docker is using internally:

    docker system df
    
  4. Ensure you’re checking disk space inside the same environment where Docker is running (VM, WSL, container, etc.)

This usually reveals why Docker reports “not enough space” despite free disk space being available.

1 Like