How to Extract Files from a DMG Disk Image on macOS
DMG (Apple Disk Image) is the standard format for distributing macOS software. When you download an app from a developer's website, it almost always comes as a .dmg file. macOS mounts DMG files natively, but extracting specific files from complex DMG images can be challenging.
The default way to open DMG files on macOS
Tool: Finder / hdiutil (built-in)
$ hdiutil attach image.dmgSteps
- Double-click the .dmg file in Finder to mount it.
- The disk image appears as a volume in Finder's sidebar.
- Drag the app or files to your desired location.
- Eject the volume when done by clicking the eject icon.
- From Terminal: hdiutil attach image.dmg
Extract individual files from a DMG archive
While the default macOS tools support selective extraction, the process typically involves Terminal commands. MacPacker makes this effortless with a visual file browser — just browse the archive contents and drag out what you need.
A better way: open DMG files with MacPacker
MacPacker is a free, open-source macOS archive manager that supports DMG and 30+ other formats. Unlike the default tools, MacPacker lets you:
- Browse archive contents like a folder
- Preview files with Quick Look without extracting
- Extract individual files via drag and drop
- Navigate nested archives (archives within archives)
- Enjoy a native SwiftUI interface that feels right at home on macOS
Get MacPacker
v0.15.1 · macOS 14+$ brew install --cask macpackerApp Store updates may lag a few days behind direct downloads due to Apple review.
Frequently asked questions
How do I open a DMG file on Mac?
Double-click the .dmg file in Finder. macOS will mount it as a virtual drive. You can then drag files from the mounted volume. With MacPacker, you can browse DMG contents directly without mounting.
How do I extract a DMG file without mounting it?
MacPacker lets you browse DMG contents like a folder — no mounting required. From Terminal, you can use: hdiutil attach image.dmg to mount, or use 7zz to extract: 7zz x image.dmg
Can I open a DMG file on Windows?
DMG is a macOS-specific format. On macOS, use MacPacker or Finder to open DMG files. On other platforms, specialized tools like 7-Zip can extract DMG contents.
Related formats
ISO is the standard disk image format for optical media. Used for OS installers, software distributions, and disc backups.
PKG is Apple's installer package format. Used for macOS software that requires system-level installation.
FAT (File Allocation Table) filesystem images are used for USB drives, SD cards, and cross-platform storage.