6

Current situation: I have a large sparse bundle image whose size is reported as 91GB (cmd+I from Finder). Its contents, instead, are only 80GB. hdiutil compact does not shrink the image:

Starting to compact…
Reclaiming free space…
..............................................................................
Finishing compaction…
Reclaimed 0 bytes out of 25.6 GB possible.

So there are 11GB of space that I cannot recover.

How I got there: Before getting into this situation, I had ~27GB of smallish files (MP3s, from 2-8MB) that I deleted from the image. I then ran hdiutil compact, but it only recovered 16GB of those 27GB, leaving 11GB of wasted space.

Any idea? Google is failing me.

2
  • From the manpage for hdiutil: "Depending on the location of files in the hosted filesystem", compact may or may not shrink the image. 11GB may just be worth recreating the image.
    – ephsmith
    Jun 24, 2012 at 4:10
  • Relevant question on ServerFault: serverfault.com/questions/14112/…
    – GDP2
    Mar 26, 2019 at 4:56

1 Answer 1

4

Either recreate the image, or defragment and repeat hdiutil compact. For defragmentation, I use iDefrag.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .