I created a password protected dmg file (http://www.hongkiat.com/blog/encrypt-mac-folder/) but when I try to add content to the mounted dmg file I receive a 'not enough space' message. I have enough space.. don't know what wrong. How to fix this issue?

2 Answers 2


I’m not 100% certain what’s going on, but I suspect you need to empty your trash while the DMG is mounted.

OS X stores the trash in a hidden directory in the root of each mounted drive. If you drag files from the mounted DMG to the trash, they won’t actually be deleted; they’ll remain in that hidden directory (inside the DMG) and take up additional space. If you empty your trash, that will delete the hidden directory, and you’ll be able to store more data in the encrypted DMG.

  • This could be the problem, but only if there are deleted items in the trash. The real answer is to increase the size of the image with the hdiutil command (see other answer on this thread for details) Apr 15, 2015 at 2:08

I found the answer for my question:

hdiutil resize -size 80m

You can use G instead of M to specify the value in gigabytes.

  • This is the right answer. The only thing to add is that you have to specify the path to the image file after the size. Apr 15, 2015 at 2:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.