Delete Old .dmg and .pkg Installers on a Mac
Once the app is in Applications, the box it came in is just a box — unless you cannot download it again.
Downloads is where installers go to be forgotten. A year of installing apps leaves behind a row of .dmg and .pkg files, some of them more than a gigabyte, sitting there long after the app is in the Applications folder.
Most of them did their job the day you opened them. The useful distinction is not “installer versus document.” It is whether you can get that file again if you ever need it. If you can, the copy in Downloads is just a box. If you cannot, it deserves a folder you chose, not a pile on the desktop.
1. A Downloads folder after a year of installing apps
Difficulty1 of 5
Open ~/Downloads in Finder and sort by size. The large files at the top are often installers you have not thought about since the week you downloaded them. Next to them there may be a PDF, a screenshot, or a zip you still need: those are not the subject of this guide.
Storage settings often groups Downloads under Documents, which is why a “Documents” slice can look larger than the documents you remember writing. How to check storage on a Mac is the place to start if you have not opened that window yet.
A spent installer is simply a file you already used. The app lives in Applications. The box can go, with one exception covered below.
If the app is already installed, the installer in Downloads is probably just taking up space.
2. How to list them, without deleting anything yet
Difficulty1 of 5
In Finder, sort Downloads by size and look for names ending in .dmg or .pkg. From Terminal, a read-only listing, biggest first, is:
ls -lhS ~/Downloads | grep -iE '\.(dmg|pkg)$'The dates in that list are useful. A .dmg from March, for an app you have been using since March, is almost certainly spent. A file from yesterday may still be in play, especially if you have not finished installing it.
When you are ready, move the spent files to the Trash rather than deleting them outright. If you were wrong about being able to download one again, it is still in the Trash until you empty it.
List first, by size and by date. Move spent installers to the Trash, not into oblivion in one step.
3. When an installer is not just a box
Difficulty3 of 5
Two kinds of installer are worth keeping, and they are rarer than they feel:
- An older version you are licensed to use, when the current download is a newer major version you have not paid for, or that no longer supports your Mac.
- A file that was sent to you once, or that came from a page that no longer exists.
In both cases, Downloads is the wrong place to keep them. Move the file into a folder you chose — somewhere you would look on purpose, not a landing zone — and leave it there. Everything else, if the app is in Applications and the current installer is still available from the developer or the Mac App Store, can go.
Apple’s own advice on freeing storage includes reviewing downloads. This is that review, with a sharper rule than “old files.”
Keep an installer only when you cannot download that version again, and keep it somewhere deliberate.
4. Eject a .dmg before you move the file
Difficulty2 of 5
After you open a .dmg, macOS mounts it as a disk, often with an icon on the desktop and a sidebar entry in Finder. If you try to move the .dmg file while it is still mounted, Finder may refuse, or you may be deleting a file that is in use.
Eject the disk first, from Finder or by dragging the icon to the Trash (that ejects it; it does not delete the .dmg). Once it is ejected, the file in Downloads is just a file, and you can move it.
A .pkg does not stay mounted, so there is no extra step. Run it, finish the installer, and the package in Downloads has nothing left to do.
Eject a mounted .dmg before you move it. A .pkg has no disk to eject.
Conclusions
Installers look like clutter because they usually are. The two questions still help:
- Is its cause still alive? If you never finished installing, keep the file until you have. If the app is in Applications, the installer has done its work.
- If I remove it, does it come back? If you can download it again from the developer or the Mac App Store, yes. If you cannot, no — so move that one out of Downloads and keep it on purpose.
Trash the boxes you can download again. Keep the rare installer you cannot, somewhere you chose.
If you would rather have spent installers listed for you, Haikos Clean has a Desktop & Downloads view that shows installers and archives you have already used, and moves only what you pick to the Trash first. Forgotten downloads also appear in Your Mac Looks Clean. Until You Ask One Question.
Questions people ask
Is it safe to delete .dmg files on a Mac?
Usually, yes, once the app is installed and you can download the installer again. A .dmg is a disk image used to copy an app into Applications. After that, the file in Downloads is only a box. Eject the image first if it is still mounted on the desktop, then move the .dmg to the Trash. The exception is an installer you cannot fetch again: an older licensed version, or a file that was sent to you once. Keep those somewhere deliberate, not in Downloads.
What about .pkg installers?
The same rule applies. A .pkg runs an installer and then has nothing left to do. If the app or tool is already on the Mac, and you can download the package again from the developer, the copy in Downloads can go to the Trash. A .pkg does not stay mounted the way a .dmg does, so there is no disk to eject. As with a .dmg, keep it only if that exact version would be hard to get back.
How do I find large installers in Downloads?
In Finder, open Downloads and sort by size, then look for files ending in .dmg or .pkg. From Terminal, a read-only listing of those files, biggest first, is ls -lhS ~/Downloads | grep -iE '\.(dmg|pkg)$'. Nothing in that command is deleted. After you have identified a spent installer, move it to the Trash rather than deleting it outright, so you can put it back if you were wrong about being able to download it again.
Sources
Paths and commands were checked against these pages on the date above.