Managing and installing applications distributed with DMG files
Periodically people who download applications end up with collections of DMG files that they are regularly accessing to use their programs. Here is how to manage these DMG files and install applications properly.
When you purchase an application or download it from a the Internet, often it will download as a .dmg file instead of the application itself. The file will likely be named similarly to the application, and some people may be a bit confused about how to properly use what they have downloaded.
MacFixIt reader Mary wrote in with a question about this:"How do you use these DMG files properly when downloading applications? Sometimes when I download apps a DMG file opens and there are instructions to install the program when I open it. At other times when I download an application I open it and it seems to work, but when I restart my system I can't find the application anymore."
Traditionally software has been distributed on physical media, like CD-ROMs, which are read-only and ensure the software on them is as the developer intended. These days, with broadband Internet, software can be more readily downloaded, but developers still have to ensure the software is received intact. If they just allow the software to be downloaded as is, then corruption may happen to it in transit; it can also be tampered with as it resides on the developer's servers.
Disk image files (of which DMG is one type) help prevent these problems by offering a way to package data in a relatively secure manner. These files mimic the function of a physical disk, and behave similarly in that the system interprets you opening them as if you have just inserted a CD-ROM into your computer, and to close them you simply eject them as you would disconnect an external drive or eject a CD-ROM. The difference is that the DMG file itself remains on your computer, unlike a CD-ROM that is removed when ejected.
In addition to behaving like a physical disk, DMG files offer the benefits of verifying their contents' integrity when they're opened, offering the ability to compress their contents, and also having read-only options so they will serve one purpose and not be easily modified.
Unfortunately, the move to regularly using DMG files for distributing applications has some people a bit confused on how to use them. I've also seen instances where people have populated their Applications folder with DMG files they have downloaded, and after a days' use they may have numerous disk images mounted on their system from which they are launching their various programs.
Here are some easy steps for managing any file you download, especially if it is distributed in DMG files.
- Locate the file
After you have downloaded the file, check the location where you downloaded it and find the DMG file itself. In some instances the file may open immediately, but this is not always the case. An easy way to do this is to check your browser's "Downloads" history, which in Safari can be accessed either in the "Window" menu or by clicking the downloads button in the Safari toolbar (this should be in the upper right of the window and look like an arrow pointing downward).
In the downloads history, click the magnifying glass icon next to the downloaded file to reveal it in the Finder (this function may be different for each browser you use).
- Open the file
Double-click the file to open it, and you should see it mount and display as if you plugged in an external drive or inserted a CD-ROM. If the file is already open, then the Finder will just show you the window for it instead of mounting the file multiple times.
- Install the application
Here is where there are two options. In some instances, developers place the application in a ready-to-use state in the disk image, where you will see the application's icon (or a folder containing it) and if you open the application it will launch and run as you would expect. In these cases the program will still need to be installed on your computer and not be kept in the disk image file, so drag it from the disk image window to your Applications folder. When you do this, you may be prompted to supply your administrator username and password because the Applications folder is somewhat protected.
The second option is if the contents of the disk image are an installer for the application, instead of the application itself. In this case the installer's icon may look like a little yellow-orange box, but if not then its name should contain the word "installer" to identify it as such. Open the installer and follow the onscreen instructions for installing the program.
- Eject the DMG file
Once you have installed the program contained on it, close down the DMG file's window and then drag the disk image to the Trash or click the Eject button in the Finder sidebar to eject it.
At this point you can now open the program from your Applications folder, instead of opening it from the DMG file itself. You now can delete the DMG file if you would like, but you may prefer to store it on an external drive or in another safe location in case you need to reinstall the program again. While many developers offer the option to redownload the DMG file, it is sometimes more convenient to have it around.
As a final thought, if you have in the past dragged entire DMG files to your Applications folder, then go to the folder and see if any are present there. If so then follow these instructions to open it, install the application contained within it, and then properly store or discard the DMG file so it does not clutter your system or take up space.