How to Open DMG Files on Mac

DMG files are Apple Disk Image archives used to distribute macOS software, system updates, and bundled file collections. macOS opens DMG files by mounting them as virtual drives in Finder, which requires ejecting the volume after use. UnFox is a free unarchiver for Mac that extracts DMG contents directly to a folder without mounting, which is faster and cleaner when you need the files rather than an interactive installer experience. The app runs entirely on your device with zero network calls and zero tracking.

What Is a DMG File and How Does macOS Handle It?

A DMG file is an Apple Disk Image that contains a complete filesystem snapshot packaged into a single file. macOS treats DMG files as mountable volumes: double clicking a .dmg file in Finder attaches it as a virtual drive that appears on the desktop and in the Finder sidebar alongside physical drives. Most macOS app installers use DMG files to present a drag to Applications workflow where you see the app icon and an alias to the Applications folder side by side. Once you finish copying the app, you must eject the virtual drive manually by right clicking and selecting Eject or dragging the volume icon to the Trash. DMG files can contain compressed data using UDZO (zlib) or UDBZ (bzip2) compression, encrypted payloads protected with AES-128 or AES-256, and license agreements that display before mounting. macOS Disk Utility provides advanced DMG management including creation, conversion between compression types, and verification of disk image integrity. The format has been the standard Mac software distribution method since Mac OS X replaced the older .smi and .img disk image formats.

What Is the Difference Between Mounting and Extracting a DMG?

Mounting a DMG creates a temporary virtual drive that behaves like a read only disk. You can browse files, run installers, and drag apps out of the mounted volume. The virtual drive disappears when you eject it, and the original DMG file remains unchanged. Extracting a DMG writes all files from the disk image directly into a normal folder on your filesystem. Extracted files persist permanently without requiring an active mount point. Mounting is the standard approach for app installation because the DMG often contains a visual layout with background artwork and an alias to the Applications folder. Extraction is better when you need to inspect the raw contents of a DMG, pull out specific resources like frameworks or configuration files, or process multiple DMG files in batch without cluttering your desktop with mounted volumes.

Note

Extraction also works on Macs where security policies restrict mounting third party disk images.

The extraction approach also works on Macs where security policies restrict mounting third party disk images, which is common in enterprise and education environments.

How Do You Extract a DMG File on Mac with UnFox?

Drag the .dmg file onto the UnFox window or right click it in Finder and select "Extract with UnFox" from the context menu. You can also use the File menu with Cmd+O. UnFox reads the disk image filesystem and displays the complete file tree with individual sizes and total uncompressed size. Click "Extract Here" to write all files to a folder alongside the DMG, or press Cmd+Shift+E to pick a custom destination. UnFox handles HFS+ and APFS formatted DMG files, as well as both UDZO (zlib compressed) and UDBZ (bzip2 compressed) disk images.

Tip

Drag a .dmg onto UnFox to extract its contents without mounting a virtual drive or needing to eject afterward.

No virtual drive appears on the desktop, no ejection step is required, and extraction includes real time progress tracking with a Dock badge. The same drag and drop workflow described in the guide on how to unzip files on Mac applies to DMG files and every other supported format.

When Should You Extract a DMG Instead of Mounting It?

Extraction is the better choice in several scenarios that go beyond simple app installation. Developers inspecting app bundle resources, framework headers, Info.plist configurations, or embedded dylib files benefit from having all contents in a regular folder that supports full Spotlight indexing and grep searches. System administrators processing dozens of DMG files from software update servers can extract them in sequence without managing mounted volumes that consume mount points and clutter the desktop. Archivists preserving macOS software collections prefer extracted folders because they integrate with standard backup tools, version control systems, and file comparison utilities. Security teams examining DMG files from unknown sources can extract and scan the contents with antimalware tools without executing any code that might be embedded in the disk image. CI/CD pipelines that need to repackage or notarize application bundles benefit from extracted DMG contents that can be processed by command line tools without requiring hdiutil mount operations. The same extraction workflow applies to opening ZIP files on Mac and every other archive format that UnFox supports, so developers and administrators use one tool for all their unpacking needs.

How Do You Open Password Protected and Encrypted DMG Files?

DMG files support two encryption levels: AES-128 and AES-256. When a DMG is encrypted, the entire disk image contents are protected and neither mounting nor extraction is possible without the correct password. macOS prompts for the password when you double click an encrypted DMG to mount it. UnFox similarly detects encryption during header parsing and prompts for the password before extraction begins. If the password is incorrect, UnFox displays a clear error and lets you re enter credentials without restarting. The password is used only for local decryption and is never stored or transmitted. Encrypted DMG files are commonly used by organizations to distribute sensitive software packages, license keys, and internal tools. Some developers also use encrypted DMG files as secure containers for storing private keys, certificates, and configuration files on shared machines. When the encryption method is AES-256, the security is equivalent to what banks and government agencies use for data protection.

Common DMG Errors and How to Fix Them on Mac

Several error conditions can prevent DMG files from opening correctly on macOS. The "image not recognized" error means the DMG file is corrupted or was not downloaded completely. Incomplete downloads from Safari or Chrome are the most common cause, especially for large DMG files over 1 GB. Verify the download file size against what the source website specifies and re download if there is a mismatch. The "no mountable file systems" error indicates that macOS cannot read the filesystem inside the DMG, which can happen with DMG files created on newer macOS versions and opened on older ones, or with DMG files that use APFS on a Mac running an older OS that predates APFS support. A "resource busy" error occurs when the DMG is already mounted or another process has a lock on the file. Check Disk Utility for existing mounts and eject them before trying again. Gatekeeper warnings about unidentified developers appear when the DMG is not code signed or not notarized. You can right click and select Open to bypass this warning for trusted sources. UnFox avoids many of these mounting related errors entirely because it reads the DMG contents without using the macOS disk mounting subsystem.

How Do You Open DMG Files Using Terminal on Mac?

macOS includes the hdiutil command line tool for working with DMG files. Running "hdiutil attach filename.dmg" mounts the disk image, which then appears under /Volumes/. You can copy files out of the mounted volume using cp or ditto commands, then detach it with "hdiutil detach /Volumes/VolumeName". For extraction without mounting, "hdiutil convert filename.dmg -format UDTO -o output" converts the DMG to a CDR (ISO) format, though this changes the format rather than extracting files directly. The pkgutil command handles .pkg installers found inside DMG files, allowing you to expand installer packages to a directory with "pkgutil --expand-full package.pkg output_dir". XAR is the format used internally by macOS .pkg installers, and users who need to inspect installer contents can open XAR files on Mac to see the payload before running the installation. For users who prefer a visual interface that avoids Terminal entirely, UnFox provides direct DMG extraction with file preview and progress tracking.

DMG Files and Other Disc Image Formats on Mac

DMG is the native Apple disc image format, but Mac users also encounter ISO, IMG, and other image types from cross platform sources. ISO files are the universal disc image standard used for Windows installation media, Linux distributions, and optical disc backups. Users who work with Windows or Linux disk images can open ISO files on Mac using the same extraction workflow that UnFox provides for DMG files. Both formats contain filesystem snapshots, but ISO uses the ISO 9660 or UDF filesystem standard while DMG typically uses HFS+ or APFS. UnFox treats disc image formats the same as compressed archives: drag the file onto the app, preview the contents, and extract to a folder. The full range of disc image and archive types is part of the 37 archive and compression formats that UnFox supports natively, eliminating the need for separate tools for each format.

Does UnFox Collect Any Data When Extracting DMG Files?

UnFox makes zero network calls during or after extraction. The app contains no analytics SDK, no crash reporter, no telemetry endpoint, and no advertising framework. Every file operation runs locally on your Mac. The app does not phone home on launch, does not check for updates over the network, and does not transmit file names, disk image metadata, or usage patterns to any server. UnFox was designed and developed in Switzerland with privacy as a core engineering constraint. You can download UnFox free from the Mac App Store with no account registration, no in app purchases required for extraction, and no ads.
Marcel Iseli
Marcel Iseli

Creator of UnFox ยท Indie Developer

LinkedIn โ†—

Marcel Iseli is an indie developer and the creator of UnFox. He builds native macOS and iOS utilities focused on privacy, simplicity, and zero tracking. Based in Switzerland, every app he ships is a one time purchase with no subscriptions and no data collection.

Frequently Asked Questions

macOS opens DMG files natively by mounting them as virtual drives. Double click any .dmg file in Finder to mount it. To extract DMG contents to a folder without mounting, use UnFox.
DMG files from trusted sources like the Mac App Store or verified developer websites are safe. macOS Gatekeeper checks the code signature before mounting. UnFox extracts contents without executing any code from the DMG.
UnFox supports password protected DMG files. The app prompts for the decryption password before extraction and displays a clear error if the credentials are incorrect.