$ dok df

Disk usage by images, containers, volumes and build cache

Synopsis

dok df [OPTIONS]

Description

Disk usage per category (images, containers, volumes and build cache) with a bar split into the part in use and the part that could be reclaimed.

-v lists the biggest items in each category, which is usually where the answer to “what ate the disk” is.

Options

-v, --verbose
Also list the biggest items in each category
--top <TOP>
How many items to list per category with --verbosedefault: 10

Every command also takes the global options: --json, --color, --icons and --theme.

Examples

$ dok df  # one bar per category
$ dok df -v  # plus the biggest offenders
$ dok df -v --top 20  # twenty per category

Output

Output of dok df against the demo stack
Rendered from dok df --demo, dok’s built-in example stack.

JSON output

$ dok df -v --json
{
  "categories": [
    {
      "active": 7,
      "count": 8,
      "items": [
        {
          "name": "ghcr.io/demo-shop/worker:1.4.2",
          "note": "1 container",
          "reclaimable": false,
          "size": {
            "bytes": 1140000000,
            "human": "1.1GB"
          }
        },
        {
          "name": "postgres:16-alpine",
          "note": "1 container",
          "reclaimable": false,
          "size": {
            "bytes": 411000000,
            "human": "411MB"
          }
        },
        {
          "name": "ghcr.io/demo-shop/api:1.4.2",
          "note": "1 container",
          "reclaimable": false,
          "size": {
            "bytes": 271000000,
            "human": "271MB"
          }
        },
        {
          "name": "grafana/grafana:11.2.0",
          "note": "1 container",
          "reclaimable": false,
          "size": {
            "bytes": 168000000,
            "human": "168MB"
          }
        },
        {
          "name": "nginx:1.27-alpine",
          "note": "1 container",
          "reclaimable": false,
          "size": {
            "bytes": 78000000,
            "human": "78MB"
          }
        },
        {
          "name": "redis:7-alpine",
          "note": "1 container",
          "reclaimable": false,
          "size": {
            "bytes": 59000000,
            "human": "59MB"
          }
        },
        {
          "name": "alpine:3.20",
          "note": "1 container",
          "reclaimable": false,
          "size": {
            "bytes": 8100000,
            "human": "8.1MB"
          }
        },
        {
          "name": "<none> 4c9e2f81a76b",
          "note": "0 containers",
          "reclaimable": true,
          "size": {
            "bytes": 244000000,
            "human": "244MB"
          }
        },
        {
          "name": "ghcr.io/demo-shop/api:1.4.1",
          "note": "0 containers",
          "reclaimable": true,
          "size": {
            "bytes": 268000000,
            "human": "268MB"
          }
        }
      ],
      "kind": "images",
      "reclaimable": {
        "bytes": 244000000,
        "human": "244MB"
      },
      "total": {
        "bytes": 2379100000,
        "human": "2.4GB"
      }
    },
    {
      "active": 5,
      "count": 7,
      "items": [
        {
          "name": "demo-shop-api-1",
          "note": "running",
          "reclaimable": false,
          "size": {
            "bytes": 12000,
            "human": "12kB"
          }
        },
        {
          "name": "demo-shop-web-1",
          "note": "running",
          "reclaimable": false,
          "size": {
            "bytes": 21000,
            "human": "21kB"
          }
        },
        {
          "name": "demo-shop-postgres-1",
          "note": "running",
          "reclaimable": false,
          "size": {
            "bytes": 30000,
            "human": "30kB"
          }
        },
        {
          "name": "demo-shop-redis-1",
          "note": "running",
          "reclaimable": false,
          "size": {
            "bytes": 39000,
            "human": "39kB"
          }
        },
        {
          "name": "demo-shop-worker-1",
          "note": "exited",
          "reclaimable": true,
          "size": {
            "bytes": 48000,
            "human": "48kB"
          }
        },
        {
          "name": "metrics-1",
          "note": "running",
          "reclaimable": false,
          "size": {
            "bytes": 57000,
            "human": "57kB"
          }
        },
        {
          "name": "scratch-box",
          "note": "created",
          "reclaimable": true,
          "size": {
            "bytes": 66000,
            "human": "66kB"
          }
        }
      ],
      "kind": "containers",
      "reclaimable": {
        "bytes": 96000,
        "human": "96kB"
      },
      "total": {
        "bytes": 141000,
        "human": "141kB"
      }
    }
  ],
  "reclaimable": {
    "bytes": 1241096000,
    "human": "1.2GB"
  },
  "total": {
    "bytes": 3714341000,
    "human": "3.7GB"
  }
}

Longer arrays are cut to their first two elements here.

See also

dok-prune(1), dok-images(1), dok(7)

dok 0.3.02026-09-27DOK-DF(1)