DMG files on Mac: what they are and how to use them
A DMG file is a disk image: one file, ending in .dmg, that holds other files and folders and opens like a small drive. Most Mac apps downloaded from the internet arrive in one. Double-click it to open it, copy or install the app, eject the image, and then the .dmg file itself can be deleted.
1. What a DMG file is
Apple describes a disk image as a file that contains other files and folders. When you open one, macOS mounts it: the image shows up in Finder like a USB stick, with its own name and an eject button, and you can browse what is inside. Nothing has been installed at that point. The app is still inside the image.
Developers use disk images because one file can carry an app, a license and a background picture with an arrow pointing at the Applications folder, and the download can be checked for damage when it opens. You will meet two other installer types on a Mac:
| File | What it is |
|---|---|
.dmg | A disk image. It opens as a volume, and you usually drag the app out of it. |
.pkg | An installer package. Double-clicking it starts an installer that puts the files in place for you. |
.zip | A compressed archive. Double-clicking it unpacks the app next to the archive, usually in Downloads. |
2. How to open a DMG file and install the app
Apple's instruction for an app downloaded from the internet is short: in the Downloads folder, double-click the disk image or package file, and if an installer does not open by itself, open it and follow the instructions. In practice, most disk images work like this:
- Open Downloads in Finder and double-click the
.dmgfile. If you cannot see it, how to find downloads on Mac covers where browsers save files. - A window opens showing what is in the image. Usually that is the app and a shortcut to the Applications folder.
- Drag the app onto the Applications shortcut, or into Applications in the Finder sidebar. This copies it to
/Applications. - If the window shows an installer instead of an app, double-click the installer and follow its steps.
- Eject the image (next section), then open the app from the Applications folder.
Don't run the app straight from the image window. It works, but the app then lives inside the mounted image and disappears from Finder when you eject it or restart. Copy it to Applications first.
3. Eject the image when you are done
A mounted image stays in the Finder sidebar under Locations until you eject it. Any of these does it:
- Click the eject button next to its name in the Finder sidebar.
- Select it and choose File › Eject, or press ⌘ E.
- Drag its icon from the desktop to the Trash, which turns into an eject symbol.
Ejecting only closes the image. The .dmg file is still in Downloads, and the app you copied stays in Applications.
4. When macOS will not open the app
macOS checks downloaded apps with Gatekeeper, which looks for a signature from an identified developer and for Apple's notarization. If an app fails the check, a warning appears and the app does not open. Apple warns that overriding this is the most common way a Mac gets infected with malware, so only go on if you trust where the file came from. If you do:
- Try to open the app once, so the warning appears.
- Open System Settings › Privacy & Security and scroll down to Security.
- Click Open Anyway, then enter your login password. Apple says the button is available for about an hour after you tried to open the app.
If the .dmg itself will not open and macOS says it is damaged or not recognized, the download was probably cut short. Delete it and download it again from the developer's site.
5. Find the DMG files on your Mac
Disk images are easy to forget. Each one is a full copy of an app you have already installed, and they pile up in Downloads.
- Finder: press ⌘ F, choose This Mac, and set the first row to Name ends with
.dmg. Switch to list view with ⌘ 2 and sort by size. - Downloads only: open Downloads, switch to list view and click the Kind column so every Disk Image sits together.
From Terminal, these commands only list things:
# every .dmg file Spotlight knows about
mdfind 'kMDItemFSName == "*.dmg"'
# the same, only in Downloads
mdfind -onlyin ~/Downloads 'kMDItemFSName == "*.dmg"'
# disk images that are mounted right now
hdiutil info
ls /Volumes
You can also mount and eject an image from Terminal with hdiutil attach ~/Downloads/Example.dmg and hdiutil detach /Volumes/Example. On macOS 27 the manual page lists diskutil image attach and diskutil eject as the preferred commands for the same two jobs. If mdfind returns nothing, see Finder or Spotlight search not working.
6. Delete old installers
Once the app is in Applications and opens from there, the .dmg has done its job. Eject the image, select the file and press ⌘ ⌫ to move it to the Trash. The space comes back when you empty the Trash (where to find the Trash on Mac).
Two reasons to keep one: the developer no longer offers that version for download, or you install the same app on several Macs. Otherwise you can download it again whenever you need it. Deleting a .dmg never removes the installed app, and deleting the app never removes the .dmg.
7. Find and clean up installers with Everything Locator
Everything Locator (free to try) indexes the folders you grant it and lists files by name, type, size and date as you type, so every installer on the Mac is one short search away. It lists the .dmg file itself, not what is inside the image.
| Search | Finds |
|---|---|
ext:dmg | every disk image in the indexed folders (sort by size with ⌘ 3) |
ext:dmg;pkg | disk images and installer packages together |
~/Downloads/ ext:dmg;pkg;zip | installers and archives left in Downloads |
ext:dmg size:>500mb | the disk images that take the most space |
ext:dmg dm:<2026 | disk images not changed since 2025 |
ext:dmg !~/Downloads/ | disk images saved anywhere other than Downloads |
zoom ext:dmg;pkg | the installer for one app |
Select the ones you no longer need and press ⌘ ⌫ to move them to the Trash; ⌘ Z puts them back. ⌘ Return shows a file in Finder if you want to look first. For other space hogs, see how to find large files on Mac.
FAQ
What are DMG files on a Mac?
Disk images: single files that hold other files and folders and open as a volume in Finder. Mac apps that are not from the Mac App Store are often downloaded as one.
How do I install a DMG file on a Mac?
Double-click the .dmg, drag the app in its window to the Applications folder, then eject the image. If the window holds an installer, double-click that and follow its steps.
Can I delete DMG files after installing?
Yes. After the app is in Applications and opens normally, eject the image and move the .dmg to the Trash. The installed app is not affected.
Where are DMG files stored on a Mac?
Wherever they were downloaded, which is ~/Downloads unless the browser was set to another folder. While an image is open, its contents appear under /Volumes and in the Finder sidebar.
How do I make a DMG file?
Open Disk Utility and choose File › New Image › Image from Folder to turn a folder into a disk image, or Blank Image for an empty one you can fill later.
List every installer in a second
Everything Locator searches your whole Mac by name, type, size and date as you type.