Part of: Mac storage full? Find what is using it and free up space safely (Storage full)
A DMG file is a disk image. Developers use it to deliver an app, and you drag the app out to install it. After the app is installed and working, the DMG has done its job, and it is usually safe to remove. They are often hundreds of megabytes each, which is why they add up.
Find them
Most land in Downloads. In Terminal, this only reads:
find ~/Downloads -name "*.dmg"
To see how big each one is, sorted by size:
ls -lhS ~/Downloads/*.dmg
If the first command prints nothing, you have none in Downloads. If you want to look at the whole home folder, replace ~/Downloads with ~, which takes longer.
Check before you remove
For each DMG, ask:
- Is the app installed and does it open? Look for it in Applications.
- Can I download it again? Most vendors keep their download page online. A DMG you cannot get again, such as an old version, is worth a second thought.
- Is it an old version I need? Some people keep a particular version on purpose.
Safe, Risky, Never
- Safe: a DMG for an app that is installed and working, and that you can download again.
- Risky: the only copy of an older version of an app, or an installer for software that is no longer sold. A DMG you made yourself of your own data also falls here.
- Never: deleting a mounted disk image while it is in use, or removing files from inside an app you installed just because they look like installer leftovers.
What breaks if you get it wrong: you may not be able to reinstall that version, and it will have to be found again. An installed app is not affected by deleting its DMG, since the app was copied out of it.
Eject first
If a DMG is still mounted, it shows in Finder like a drive. Eject it before you remove the file. Removing a file that is in use can cause errors, and ejecting costs nothing.
Old macOS installers
When you download a macOS update or installer app, it can stay on the disk after it finishes. Once the update is installed and your Mac runs well, that installer is not needed to run macOS. Check Applications for items named Install macOS followed by a version name. Keep one only if you made a bootable installer on purpose and want it.
Other update leftovers
Packages (PKG files), ZIP archives and the folders you got after unzipping them follow the same rule: if the app is installed and works, the leftover is usually safe to remove. If you are not sure that a ZIP holds only an installer, open it before you decide.
Empty the Trash
Removing a file moves it to the Trash, and the space comes back after you empty it. See why moving files to the Trash does not free up space.
Why DMG files are so large
A DMG holds a whole app, plus a small amount of packaging, and many apps today are hundreds of megabytes. When you download an update for an app you use, you get a new DMG each time, and the old one stays in Downloads. After a year of updates, a handful of apps can leave several gigabytes behind.
That is why this is an easy win on a cluttered disk. The files are easy to recognise, they have a clear job that is now finished, and for most of them a fresh copy is one download away. The usual rule still applies: look at the list first, keep what you may need, and empty the Trash only when you are sure.
Finding them in a scan
DiskJoy is our product. It scans the folders you allow and lists old downloads, with sizes and dates, among other categories. A scan only reads file sizes and dates and changes nothing. DiskJoy is pre-alpha and cleanup is not available yet, so you remove files yourself. Download DiskJoy for Mac to try a scan.
Keep Downloads tidy
A DMG is only one kind of leftover. How to clean up the Downloads folder covers the rest, and find large files on a Mac shows how to spot the biggest ones. The complete guide to freeing up space on a Mac puts it all in order.
Frequently asked questions
Is it safe to delete DMG files on a Mac?
Yes, once the app they contained is installed and works. A DMG is a disk image used to deliver the app. Keep it only if you may need to reinstall without downloading again.
Can I delete the macOS installer after updating?
Usually yes. After an update finishes, a leftover installer is not needed to run macOS. Keep it only if you made a bootable installer on purpose.
Where are DMG files on my Mac?
Mostly in Downloads. In Terminal, find ~/Downloads -name "*.dmg" lists them.