Disk images

When working with disk images it’s good to keep in mind that they are basically just containers for data. They can be solid files with fixed size (for example, ISO images), compressed files (like large ZIP files) or even bundles (sets of smaller files virtually appearing as single objects) in case of sparse bundles.

When mounted, each disk image reports three values: capacity, used space and free space, just like a real disk. The problem is that these figures are virtual and sometimes may be misleading (no, this is not how DaisyDisk works, that’s the data macOS provides).

For fixed-size images, the capacity matches the actual amount of space taken by the image on disk. The free space and used space indicate the amount of data that the disk image can contain, but the actual size of the disk image remains the same even if it’s completely empty.

Things get even more interesting with sparse images and sparse bundles. Unlike the fixed-size images, whose size is, well, fixed, sparse images can be initially small and expand when necessary. The virtual capacity of sparse images can even exceed the size of the storage device where the image is located. The virtual free space figure, in its turn, is limited by the system to the amount of real free space on the storage device. That’s where the weird things begin. The used space figure is calculated as the difference between the capacity and free space values. Consequently, when the virtual capacity of the disk image exceeds the real free space on the storage device, you may see strange used space figures that have nothing to do with the size of data actually located on the disk image.

Keep in mind, that sparse images can only grow and never shrink automatically. In other words, deleting files from a sparse image in attempt to reduce its size won’t work. You’ll have to compact the image using hdiutil compact console command.

Virtual disks

Some virtual disks may also misreport more free space or higher capacity than they actually have. Unfortunately, there’s hardly anything we can do about it, as the same figures are presented by the Finder.

Network disks

Network disks are essentially shared folders, so DaisyDisk displays only their used size, but not capacity and free space. (Even though the network shares are formally mounted as disks to macOS.)