My .dmg file won't update the capacity when I delete files

Joined
May 5, 2008
Messages
2
Reaction score
0
Points
1
Your Mac's Specs
Powerbook G4 Mac OS 10.4.11
Hello,

I am new to the forum and I apologize in advance if this is a relatively easy problem. Here we go:

I searched on the internet on how to create a locked .dmg file. I created one with a total capacity of 1000 MB. It is a read/write disk image, not a sparse disk image. I have since deleted a bunch of files off of the mounted image by dragging them into the trash, but the total file size has not updated itself. When I look under disk utility, it says there are 22 files (there are really only 13) and the space used is 938.9 MB with 61 MB remaining (it should be a lot more -- or so I thought-- because I deleted files).

Is there something else I have to do, so the image file updates its capacity? I have read a lot of about doing 'hdiutil compact' but that seems to be only for spare images, which this isn't. Do normal read/write .dmg files not update their capacity automatically when you delete files from them? Any help you could provide would be great.

Cheers
 
Joined
Sep 13, 2006
Messages
3,570
Reaction score
470
Points
83
Location
Colorado
Your Mac's Specs
Mac's
You need to delete the files.... AND... empty the trash.

Does that solve your problem?
 
OP
C
Joined
May 5, 2008
Messages
2
Reaction score
0
Points
1
Your Mac's Specs
Powerbook G4 Mac OS 10.4.11
No, sorry. Although when I dragged the files from the drive into the trash, they didn't appear in the trash. I emptied it anyway though.

Are the .dmg files supposed to automatically resize themselves when you delete files from them, or is there a special way to delete files from them which I possibly didn't do?
 

cwa107


Retired Staff
Joined
Dec 20, 2006
Messages
27,042
Reaction score
812
Points
113
Location
Lake Mary, Florida
Your Mac's Specs
14" MacBook Pro M1 Pro, 16GB RAM, 1TB SSD
A DMG file is a virtual disk. And much like a hard disk, even though you remove the data from the disk, the capacity stays the same. Same thing with a DMG file - even empty, it still takes up the same amount of space. Here is an example - this is an empty DMG that was just created in Disk Utility:

2008-05-05_1332.png
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top