Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dontlan

macrumors regular
Original poster
Jan 9, 2024
124
10
I have a 200gb dmg file on my hdd. i need to unzip it to my hdd, but it doesn't have another 200gb of free space.

How do i extract it without freeing up space on my hdd?

Or how can I delete files in the dmg file itself?


P.S sorry for my English, it's my non-native language. if you don't understand me please ask clarifying questions
thanks!
 
A "dmg" file is a disk image, not a "zip" file.

What happens if you just double-click on it?
Does the disk image mount on the desktop?

If so, just mount it, delete whatever you need to delete, then eject it.
It will still be a "dmg" -- just a smaller one.

If the dmg file WON'T mount on the desktop, I'd suggest:
- get ANOTHER (external) drive
- copy the dmg file to the drive
- try mounting it that way.
 
  • Like
Reactions: chabig
If so, just mount it, delete whatever you need to delete, then eject it.
It will still be a "dmg" -- just a smaller one.
Just so the OP doesn't get confused...

The size of a disk image file (.dmg) will not automatically decrease after you delete any of the contained files. As far as I know, making a disk image file smaller requires using a Terminal command like 'hdiutil compact' (for sparse types) or 'hdiutil resize' (I think) for a regular read/write .dmg file.

How do i extract it without freeing up space on my hdd?
Do you want to copy files from the 200GB dmg onto your HDD? If so, you must have the extra storage space. Keep in mind that the files within the dmg might take up much less than 200GB. (Some dmg are fixed size, even if there are no files at all within it!)

Instead of copying files out of the dmg, you could mount it (typically done by double-clicking the .dmg file in Finder) and just "use" the files directly while they stay in the dmg. You'll be abe to open, edit, delete them as usual with Finder.

Or how can I delete files in the dmg file itself?
Once mounted, you may use Finder to delete files from the dmg. However, as I mentioned above, deleting files from the dmg will not (automatically) make the dmg smaller. I know that sounds surprising, but that's the way disk images work. (Unless I'm forgetting something!)

If you really want to copy large amounts of the files to your computer HDD, I think you need to get an external drive, put the dmg on it, and delete the dmg from your internal HDD (thus freeing up 200GB on the internal drive).
 
Actually, Brian is correct.
I didn't think of that (getting old!).

The OP seems to have disappeared, in any case.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.