Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just did some data recovery on a failing hard drive. I have a 1.5 TiB DMG image of the hard drive. I don't have enough free space to simply copy the files elsewhere, and I would like to extract them in place.

How can I move the files out of the image? I just moved some files with Finder but the size of the DMG file doesn't seem to have changed. Can I shrink a the partition inside the DMG file in order to reclaim some space?

share|improve this question
you could create a 7z archive of the DMG image. That would likely shrink down the file size provided it is not encrypted or something. – kush Dec 11 '12 at 18:58
@kush have you tested that ? I just tested on a small image I created, but the blocks are still there after a deletion, hence compression has no effect. – alecail Dec 12 '12 at 9:27
This question suggests you are correct. – kush Dec 12 '12 at 10:05

In general, you can't shrink images once they're created. It's also exceedingly difficult to grow them (disk images). The best way to save space is to try to compress the image, but that may make extraction more difficult.

share|improve this answer

When you create a DMG image you can create it using a compressed format. Once it exists however, then you either have to create a new one & transfer all the data to it, or simply compress it another way eg by turning it into a zip file.

share|improve this answer

You must log in to answer this question.

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