What happened:
For images with duplicated files across layers, the reported Potential wasted space is overstated (appears to count all copies), while the efficiency percentage suggests only removable duplicates are counted.
Example:
ghcr.io/openclaw/openclaw:2026.2.17
ghcr.io/openclaw/openclaw:2026.2.21
For 2026.2.17, there is an extra ~900 MB chown layer that duplicates most files from a ~970 MB pnpm install layer.
The UI reports:
- Total image size: ~3.2 GB
- Potential wasted space: ~1.8 GB
- Efficiency: ~71%
The 71% efficiency implies ~29% waste (~900 MB of 3.2 GB), but the wasted-bytes value shows ~1.8 GB (double-reporting reclaimable space).
What you expected to happen:
Potential wasted space should represent only reclaimable duplicate bytes:
- If a file path has 1 copy: reclaimable = 0
- If a file path has 2 copies: reclaimable = 1 copy
- If a file path has N copies: reclaimable = N-1 copies
So in this case, expected wasted space is roughly the duplicate layer size (~900 MB), not both copies (~1.8 GB).
How to reproduce it (as minimally and precisely as possible):
- Pull or analyze image
ghcr.io/openclaw/openclaw:2026.2.17.
- Open it in dive and check the image details/inefficiency section.
- Observe:
- An extra
chown layer (~900 MB) that duplicates files from a pnpm install layer (~970 MB).
- Reported potential wasted space is ~1.8 GB.
- Compare with efficiency percentage (~71%), which corresponds to ~900 MB reclaimable from a ~3.2 GB image.
Anything else we need to know?:
This appears in duplicate-heavy layer patterns (e.g., copy/chown of existing content). The percentage metric and byte metric become inconsistent in these cases.
Environment:
- OS version:
macOS 26.2
- Docker version (if applicable):
Engine 29.2.1
What happened:
For images with duplicated files across layers, the reported Potential wasted space is overstated (appears to count all copies), while the efficiency percentage suggests only removable duplicates are counted.
Example:
ghcr.io/openclaw/openclaw:2026.2.17ghcr.io/openclaw/openclaw:2026.2.21For
2026.2.17, there is an extra ~900 MBchownlayer that duplicates most files from a ~970 MBpnpm installlayer.The UI reports:
The 71% efficiency implies ~29% waste (~900 MB of 3.2 GB), but the wasted-bytes value shows ~1.8 GB (double-reporting reclaimable space).
What you expected to happen:
Potential wasted space should represent only reclaimable duplicate bytes:
So in this case, expected wasted space is roughly the duplicate layer size (~900 MB), not both copies (~1.8 GB).
How to reproduce it (as minimally and precisely as possible):
ghcr.io/openclaw/openclaw:2026.2.17.chownlayer (~900 MB) that duplicates files from apnpm installlayer (~970 MB).Anything else we need to know?:
This appears in duplicate-heavy layer patterns (e.g., copy/chown of existing content). The percentage metric and byte metric become inconsistent in these cases.
Environment:
macOS 26.2Engine 29.2.1