Michael de Silva's Blog

Software Engineer. Rubyist and Roboticist.

Michael de Silva's Blog

Software Engineer. Rubyist and Roboticist.

Reclaim Disk Space with hdiutil & Sparse Bundle Disk Images for Mac OS X

First blog post for 2014 and guess what? I managed to reclaim over 50gig of disk space in under 20 seconds by shrinking a ~96 gig sparse bundle disk image down to around 40 gigs.

-> % hdiutil compact Cohiba_secure.sparsebundle 
Enter password to access "Cohiba_secure.sparsebundle": 
Starting to compact
Reclaiming free space
...............................................................................
Finishing compaction
Reclaimed 52.4 GB out of 251.5 GB possible.

It's that easy...

comments powered by Disqus