OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
apps-services medium occasional DISPUTE

Find and move Docker images that live in /var/lib/containerd, not /var/lib/docker

omarchyarchdockercontainerdbtrfsdesktoplaptop
AUDITED Audited against its sources and confirmed accurate. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

Docker's containerd store page says the containerd image store is the default for Docker Engine 29.0 and later on fresh installations, that upgraded daemons keep overlay2, that it stores both compressed and uncompressed layers, and that containerd's storage is not moved by a custom Docker data directory. Docker's daemon page says data-root does not affect /var/lib/containerd and to set root in /etc/containerd/config.toml. On this 4.0.4-1 workstation docker is 29.7.2-1 and containerd 2.3.5-1, docker.service runs 'dockerd -H fd:// --containerd=/run/containerd/containerd.sock' and Wants containerd.service, /etc/containerd does not exist, 'containerd config default' prints 'version = 4' and "root = '/var/lib/containerd'" with only that one unindented root line, so the record's sed hits only it. /etc/docker/daemon.json is owned by omarchy-settings, listed in its backup files, and holds exactly the four keys the record reproduces. /var/lib/docker and /var/lib/containerd are plain directories (inode numbers not 256) inside @. The cross-referenced slug snapper-snapshots-pin-docker-images-and-vm-disks exists in the corpus. Not exercised: docker info needs root and nothing was moved.

RISK

Stopping docker and containerd stops every running container. Deleting /var/lib/containerd or /var/lib/docker before checking the copy loses all images, containers and volumes. Switching the image store setting (as opposed to moving its directory) hides the other store's images until you switch back.

Symptom

I set "data-root": "/mnt/data/docker" in /etc/docker/daemon.json to keep Docker off my root partition, but every docker pull still eats space on /. sudo du -sh /var/lib/docker (or the new data-root) is small, while df -h / keeps shrinking. ncdu over /var/lib/docker cannot find where tens of gigabytes went. Images also seem to take more space than they did on older Docker.

Cause

Docker Engine 29 made the containerd image store the default on fresh installations. Image layers and container snapshots then belong to the system containerd, under its own root, /var/lib/containerd. On Arch docker.service runs dockerd -H fd:// --containerd=/run/containerd/containerd.sock, so that is the separate containerd.service (confirmed on an Omarchy 4.0.4-1 install with docker 29.7.2 and containerd 2.3.5). Docker's data-root moves only /var/lib/docker (volumes, container metadata, logs), and Docker's own documentation says it does not affect /var/lib/containerd. The containerd store also keeps both the compressed and the extracted copy of every layer, so the same images take more space than they did under overlay2. Machines upgraded from Docker 28 or earlier keep the old overlay2 store in /var/lib/docker until it is switched.

On Omarchy 4 both directories are plain directories inside the @ root subvolume, so they also end up in every Snapper snapshot. See snapper-snapshots-pin-docker-images-and-vm-disks.

Fix

**1. See which store you have and where the space is:**


sudo docker info -f '{{ .DriverStatus }}'     # [[driver-type io.containerd.snapshotter.v1]] = containerd store
sudo docker info -f '{{ .DockerRootDir }}'
sudo du -sh /var/lib/docker /var/lib/containerd
sudo docker system df

**2. Move the containerd root.** Arch ships no /etc/containerd/config.toml, so generate one, which gives the native config version for the installed containerd:


sudo systemctl stop docker.socket docker.service containerd.service
sudo mkdir -p /etc/containerd
containerd config default | sudo tee /etc/containerd/config.toml >/dev/null
sudo sed -i "s|^root = .*|root = '/mnt/data/containerd'|" /etc/containerd/config.toml
grep -E '^(version|root)' /etc/containerd/config.toml
sudo mkdir -p /mnt/data/containerd
sudo cp -a /var/lib/containerd/. /mnt/data/containerd/
sudo systemctl start containerd.service docker.socket docker.service
sudo docker image ls          # your images must still be listed

Only once images and containers work from the new location, remove the old copy with sudo rm -rf /var/lib/containerd.

**3. Move the rest with data-root, if you want volumes moved too.**

  • **Omarchy 4:** /etc/docker/daemon.json is owned by omarchy-settings and listed as a backup file, so your edit survives updates and a changed upstream version arrives as daemon.json.pacnew. Add the key and keep Omarchy's dns and bip, which the shipped container DNS setup depends on:

{
    "log-driver": "json-file",
    "log-opts": { "max-size": "10m", "max-file": "5" },
    "dns": ["172.17.0.1"],
    "bip": "172.17.0.1/16",
    "data-root": "/mnt/data/docker"
}
  • **Plain Arch:** create /etc/docker/daemon.json with just { "data-root": "/mnt/data/docker" }.

Then stop Docker, sudo cp -a /var/lib/docker/. /mnt/data/docker/, and start it again, as in step 2.

If you would rather reclaim than move: sudo docker image prune -a and sudo docker builder prune act on whichever store is active.

Verify

sudo docker info -f '{{ .DockerRootDir }}' shows the new data-root, sudo du -sh /mnt/data/containerd holds the image data, and df -h / no longer drops when you sudo docker pull a large image.

Sources

docker-29-containerd-image-store-outside-data-root