Mac OS X: Disk Image File Cannot Be Deleted While the Image Is Available

A disk image file cannot be deleted while the related disk image appears on the desktop or is otherwise available..
Symptom

An alert box with this message appears when you try to delete a disk image file:


Solution

This is a normal behavior. You only need to quit using files stored on the disk image to be able to delete it. You make a disk image appear on the desktop or otherwise become available by double-clicking a ".img" file. This is sometimes called a "mounted" disk image. Though a disk image is not actually a disk, it behaves as one. Follow these steps to put it way or "unmount" it:

For more information on disk images, see technical document 106161: "Mac OS X: About Using Disk Copy Images".
Published Date: Oct 8, 2016