View Full Version : Shrink a .sparseimage?

10-14-2006, 11:06 PM
I have SuperDuper! update a .sparseimage on a FireWire drive but I noticed the image only grows larger, it never gets smaller... If I get info on my MacBook Pro drive, it only shows 40 gigs used but the backup .sparseimage is 60 gigs. At one point I DID have 60 gigs on the MacBook Pro drive but I since have deleted a lot...

I know I could create a brand new .sparseimage and it will be 40 gigs but that is incredibly time consuming. I just wonder if there's something that I don't know about that could make the current .sparseimage shrink?

10-15-2006, 07:54 AM
With the sparse image volume ejected, open the Terminal application and type:

hdiutil compact

(with a space after it), then drag the sparse image file into Terminal. That'll type its file name and path. Press Enter, and it'll recover the free space in the file and shrink the image.

10-15-2006, 09:51 AM
I totally forgot about the hdiutil console command... :p


10-15-2006, 10:16 AM
You bet -- glad I could help shake the old info loose.

10-24-2006, 08:57 AM

Is this something you could possibly offer as a checkbox option in SD? I suppose you could attach a script to the end of the sync but having a checkbox that offers to do it for you would be a nice touch.


10-24-2006, 10:22 AM
Frankly, we think this is something the regular image code should be handling better. But we're considering various possibilities...