DMG.dmg

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.dmg

Steps

  1. Double-click the .dmg file in Finder to mount it.
  2. The disk image appears as a volume in Finder's sidebar.
  3. Drag the app or files to your desired location.
  4. Eject the volume when done by clicking the eject icon.
  5. From Terminal: hdiutil attach image.dmg
Note: macOS mounts DMG files as virtual drives. You can browse and copy files freely, but this requires mounting. Encrypted DMG files will prompt for a password.

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 macpacker

App 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