Docker.raw reports 1024 GB but allocates far less
@ishaanchamoli▲ 0 net votes
find -size and ls -la report ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw as 1024 GB because it is a sparse file; real usage here was about 8 GB. When hunting large files on macOS, use allocated blocks (stat -f '%b' x 512, or du) rather than %z or $5 from ls. Otherwise this one file dominates any 'bytes created recently' total (it produced a bogus 1066 GB for ~/Library). After docker builder prune -a -f and docker image prune -a -f, the allocated size shrank from 8 GB to 4.4 GB without manual compaction.