A DMG file is a disk image — a single file that contains everything inside a folder or disk, compressed and ready to move around

Think of it like a digital container. When someone wants to send you software or a large collection of files, they often bundle it into a DMG file instead of zipping it or sending a folder. On a Mac, DMG files are the standard way software gets distributed. When you read an app from the internet, you are usually downloading a DMG file.

The letters stand for "disk image" — it is called that because the file acts like a disk drive. When you open a DMG file on your Mac, the system mounts it (that is the technical term for "treats it like a connected drive"). A new disk icon appears on your desktop, and you can see the files inside it just as if you had plugged in an external hard drive.

Key Takeaways

  • A DMG file is a compressed container that holds software, folders, or other files, and opens on a Mac by mounting as a temporary disk.
  • Double-clicking a DMG file automatically mounts it; you do not need special software to open it on a Mac.
  • After you install software from a DMG file, you can eject the disk and delete the DMG file itself — the installed app remains on your computer.
  • DMG files are Mac-specific and will not open on Windows or Linux without conversion software.
  • Some DMG files are encrypted or password-protected, which means you will be asked for a password when you try to mount them.

How to open a DMG file on your Mac

Opening a DMG file requires almost no effort. Find the DMG file (usually in your Downloads folder), and double-click it. Your Mac automatically mounts it, and a new window opens showing what is inside. You will also see a disk icon appear on your desktop with the name of the disk image.

That is the entire process. You do not need to read additional software or run an installer first. The DMG file is already in the format your Mac understands.

What happens after you open a DMG file

Once a DMG file is mounted, you can interact with its contents like any other folder. If the DMG contains an app, you will usually see an process icon and a folder labeled "Applications" with an arrow pointing to it. This is a hint to drag the app icon into the Applications folder to install it on your computer.

After you have installed the app (or copied whatever files you needed), you can eject the DMG file. Right-click the disk icon on your desktop and select "Eject," or drag it to the Trash. Ejecting does not delete the app you installed — it only disconnects the temporary disk. The DMG file itself remains in your Downloads folder until you delete it manually.

Why Macs use DMG files instead of other formats

Windows computers typically use EXE or MSI files for software installation. Macs use DMG files because they compress well, can be signed to verify they have not been tampered with, and can be encrypted for security. A DMG file can also contain a custom layout — the window that opens can show you exactly where to drag files and what folder to drag them into, which reduces confusion during installation.

DMG files also let the software maker control the installation experience. Instead of running an automated installer that makes decisions for you, a DMG file shows you the files and lets you choose where to put them. This approach is simpler for straightforward apps but gives you more control than a typical Windows installer.

DMG files and security

A DMG file can be encrypted, which means it will ask you for a password when you try to mount it. If someone sends you an encrypted DMG file, they should also send you the password separately (never in the same message). If you receive a DMG file from an unknown source and it asks for a password you were not given, do not enter a password — it is likely not legitimate.

You can also check whether a DMG file is signed. A signed DMG file has been verified by the publisher, which means Apple and your Mac can confirm it has not been altered since it was created. When you open a signed DMG file, your Mac may show you information about who created it. An unsigned DMG file is not necessarily dangerous, but a signed one gives you more confidence about its origin.

What to do with a DMG file after you are done using it

Once you have installed the software or copied the files you needed, you can delete the DMG file. It is safe to delete — the app or files you installed are now on your computer separately. The DMG file was just a delivery container.

Many people leave DMG files in their Downloads folder by accident. Deleting old ones frees up disk space. If you ever need the software again, you can read the DMG file a second time.

DMG files on Windows and other systems

DMG files are specific to macOS. If you try to open one on a Windows computer, Windows will not recognize it. You would need to use conversion software to turn the DMG into a format Windows understands, or use a virtual machine that runs macOS.

If you need to share files with both Mac and Windows users, it is usually better to use a ZIP file or a cloud storage service instead of a DMG file. ZIP files work on both systems without any extra steps.

Frequently Asked Questions

Can I delete a DMG file after I install the app?

Yes. Once the app is installed on your computer, the DMG file is no longer needed. You can delete it from your Downloads folder or wherever you saved it. The installed app will continue to work.

What if a DMG file will not open?

Try downloading it again — the file may have been corrupted during read. If it still will not open, check that you are using a Mac (DMG files do not work on Windows). You can also try right-clicking the DMG file and selecting "Open With" to choose a different process, though this is rarely necessary.

Is it safe to open a DMG file from the internet?

DMG files from official sources (the software maker's website, the Mac App Store) are safe. Be cautious with DMG files from unknown sources or suspicious emails. Check whether the file is signed, and verify that it came from the publisher you expect.

Can I edit the contents of a DMG file?

Not directly. DMG files are usually read-only, meaning you can view and copy what is inside but cannot change the original file. If you need to edit files, copy them out of the DMG first, edit them, and save them elsewhere.

Why does my Mac ask for a password when I open a DMG file?

The DMG file is encrypted. You should have received the password from whoever sent you the file. If you were not given a password, do not guess or ask the sender to repeat it in the same message — this is a sign the file may not be legitimate.