How to resize DMG file to remove empty space?

Discussion in 'macOS' started by armoguy94, Jul 16, 2009.

  1. armoguy94 macrumors 6502

    Joined:
    Nov 9, 2007
    #1
    I made an image of a partition on my hard drive. The partition takes up 8gb but the actual content in it is below 4gb, the rest is just empty space. The image, no matter what I do or how I do it, keeps turning out to be 8gb as well, and then when I mount it, it has more than 4gb of empty space. How do I shrink the disc image to remove the empty space?! Nothing seems to be working.

    I tried hdiutil resize in an attempt to resize the dmg to 4gb, and it returned an error saying that is below the minimum size...?
    I also tried hdiutil compact and it returned an error saying Function not implemented.

    Is there anything I can do in order to shrink this dmg to delete all the useless space? It's important, because I need to burn it to a DVD.
     
  2. Benjamindaines macrumors 68030

    Benjamindaines

    Joined:
    Mar 24, 2005
    Location:
    A religiously oppressed state
    #2
    Use Disk Utility and convert the DMG image to a sparse image.
     
  3. uzi macrumors newbie

    uzi

    Joined:
    Dec 8, 2007
    #3
    Pry tell, how would one exactly do that, I clicked on "Convert" from "Disk Utility" and do not see that as an option --should I?
     
  4. Benjamindaines macrumors 68030

    Benjamindaines

    Joined:
    Mar 24, 2005
    Location:
    A religiously oppressed state
    #4
    That's how you would do it. You may need to enable additional disk image types in Disk Utility (shoulf be easy to find on Google). Then just try again and you should see the sparse option.
     

Share This Page