diff --git a/command/formatter/disk_usage.go b/command/formatter/disk_usage.go index ff1ab768c0..dc5eec41d7 100644 --- a/command/formatter/disk_usage.go +++ b/command/formatter/disk_usage.go @@ -196,7 +196,10 @@ func (c *diskUsageImagesContext) Reclaimable() string { c.AddHeader(reclaimableHeader) for _, i := range c.images { if i.Containers != 0 { - used += i.Size + if i.VirtualSize == -1 || i.SharedSize == -1 { + continue + } + used += i.VirtualSize - i.SharedSize } }