failed to register layer (Docker) — how to fix
failed to register layer: Error processing tar file(exit status 1): write /usr/lib/x86_64-linux-gnu/libLLVM.so: no space left on device
failed to register layer: open /var/lib/docker/overlay2/.../committed: no such file or directory
Quick fix: Read the end of the message. For no space left on device: docker system df, then docker system prune -a (and docker builder prune) or grow the disk/Docker Desktop disk image. For missing/corrupt layer files: docker image rm the image and pull again; if that fails, restart Docker, and as a last resort reset /var/lib/docker (deletes all images and containers).
What it means
docker pull (or the pull step of docker run / docker compose up / a build's FROM) downloads each layer as a tarball and then registers it: extracts it into the storage driver directory, usually /var/lib/docker/overlay2/. failed to register layer means that extraction failed. The useful part is whatever follows it.
Cause 1: no space left on device
The most common case, especially with large images (CUDA, ML, browsers). Layers are compressed during download and can be several times larger unpacked.
df -h /var/lib/docker
df -i /var/lib/docker # inodes can run out too
docker system df
Free space:
docker container prune
docker image prune -a # removes all images not used by a container
docker builder prune # build cache
docker system prune -a --volumes # everything unused, including volumes: careful
On Docker Desktop (Mac/Windows) the limit is the virtual disk size, not your host disk. Increase it under Settings > Resources, or prune as above.
To move Docker's storage to a bigger disk on Linux, set "data-root": "/mnt/bigdisk/docker" in /etc/docker/daemon.json, then restart Docker (existing images stay in the old location unless you copy them).
See also no space left on device.
Cause 2: corrupted or half-written layer data
Messages like no such file or directory for a path under /var/lib/docker, unexpected EOF, or a layer that "already exists" but is broken usually come from an interrupted pull, a crash, or a full disk during an earlier pull.
docker image rm <image> # if a partial image is listed
docker pull <image>
If it still fails, restart the daemon and retry:
sudo systemctl restart docker
Last resort, this deletes all images, containers and volumes:
sudo systemctl stop docker
sudo rm -rf /var/lib/docker
sudo systemctl start docker
On Docker Desktop, the equivalent is Troubleshoot > Clean / Purge data.
Cause 3: filesystem or storage driver limitations
/var/lib/docker on a filesystem that overlay2 does not support well (some network filesystems, or XFS without ftype=1) can produce extraction errors. Check:
docker info | grep -iE 'storage driver|backing filesystem|supports d_type'
Supports d_type: false needs fixing: put data-root on ext4 or XFS created with ftype=1.
Cause 4: rootless Docker / user namespaces
With rootless Docker or userns-remap, layers containing files with UIDs/GIDs outside your subordinate ID range fail with errors like lchown ... invalid argument. Give the user a large enough range in /etc/subuid and /etc/subgid (65536 IDs is the usual minimum), then restart the daemon.
Last updated 2026-12-02.