5

When I install a package, it creates a directory with the name of the package on my desktop. In Finder it looks like a new external drive:

new mounts

Why is that? Should I always remove those drives after installation? Or did I do something wrong and this should not show up?

5
  • That doesn't show your desktop - that shows a removable drive named "Mendeley Desktop". To confirm, using Terminal type the command ls ~/Desktop and see if that file is there.
    – Allan
    Mar 11, 2020 at 8:26
  • 6
    @Allan drives are visible/shown on the desktop
    – minseong
    Mar 11, 2020 at 9:14
  • @theonlygusti but they won't be listed on desktop. I addressed it in my answer but smh
    – anki
    Mar 11, 2020 at 19:58
  • That's not a directory, that's a drive. It is not a physical drive but a virtual drive mounted from a disk image (.dmg file)
    – slebetman
    Mar 12, 2020 at 6:56
  • Possible duplicate of apple.stackexchange.com/questions/365817/…
    – lhf
    Mar 12, 2020 at 10:53

4 Answers 4

7

This is normal. These programs have been downloaded as virtual disk or .dmg files.

For example Mendeley Desktop is a program supplied as Mendeley-Desktop-1.19.4-OSX-Universal.dmg file. When you open the downloaded file by default you will see it appear on your desktop and as a removable drive in Finder.

Screenshot

Once you have dragged the application to Applications you can eject the virtual disk in Finder and then delete the downloaded .dmg file.

Note some programs - MS Office for example - are supplied as packages (files ending in .pkg) rather than .dmg files. When you run this type the program is installed without mounting a virtual drive and macOS will automatically prompt you to delete the installer file once done.

7
  • 3
    why do they install this way?
    – minseong
    Mar 11, 2020 at 9:14
  • 1
    I've no idea why some developers prefer one method over another. To me the run a .pkg method rather than the mount a .dmg then drag-and-drop method seems more intuitive but it is probably a matter of opinion. There is some good discussion of pros and cons in this stack overflow question How do I package a Mac OS application for install?
    – lx07
    Mar 11, 2020 at 9:32
  • @theonlygusti check the link provided by ankii in his answer
    – hans
    Mar 11, 2020 at 9:35
  • In my experience the package file is usually in the disk image. So you mount the dmg and then double click on the package installer rather than drag and drop. It's used when the application is more than just a simple bundle.
    – Barmar
    Mar 11, 2020 at 17:39
  • 2
    @theonlygusti This evolved from the time of floppy disks then later CD then DVD. When people started shipping software over the internet they just continued the tradition with disk images. As for why drag-and-drop instead of installers - it comes from the times when Mac software are a single file (you can actually edit the resources contained in the file like images, audio, icons etc with resedit). When OSX took over Apple devs wanted to give developers a similar experience and thus created the system we have today where an application is just a special type of folder that behaves like a file
    – slebetman
    Mar 12, 2020 at 7:06
4

This is basically like if you had mounted a USB disk (or a CD Rom for older people) with the intaller on it. Hence the eject sign on the side. Once you're done installing, you can hit the eject button, that will "unmount" the drive. It should then disappear from where it was (in your case, the desktop).

2
  • Sure, I unmount them, but I was just wandering why they stay mounted after installation.
    – hans
    Mar 11, 2020 at 9:16
  • 1
    You'll some Apps give you the option to unmount and trash by itself - i guess it just depends on the developpers...
    – Thai
    Mar 11, 2020 at 9:24
2

I suggest you go to Finder, View menu → Columns. Now Go menu → Computer. You should see what Macintosh HD is, what is inside it etc. Some folders deep you'll see the default/ main folders: Desktop, Downloads, Movies, Pictures etc. Unlike windows, Desktop is not at the top of hierarchy.

As for the three new "dirs", they are volumes, mounted to install new software; could also be used to share files etc. Such icon would also appear if you mount a pen drive. They can be ejected as long as no other process is using them.

The icon you see at the desktop is a shortcut to the volume for easy access, after it is mounted. You can right click on it, select Get info and see its location. Most probably, it would be Downloads.

Just be safe when downloading DMGs from the internet. Specially the ones who claim to be some software but then send an Adobe Flash installer. Open a dmg (not a .pkg), see its contents, and size and if anything is suspicious, eject it and delete it.

Further, don't give root passwords to unknown installers either. Unlike windows, there is no "Run as administrator" and in day to day usage, I don't need to use sudo much often.

5
  • 1
    What's an "eject-able dir"? They are also, not "installers." They are volumes or removable drives (i.e. flash disks) that currently mounted. Within that volume, you can have an installer. You don't know if any/all of those are .dmgs, physical drives, or manually created volumes.
    – Allan
    Mar 11, 2020 at 8:36
  • dir is what I picked from the question, thus is in italics.
    – anki
    Mar 11, 2020 at 8:36
  • 1
    It's likely the OP's brining that from the Windows world. In the Unix-verse, they're called "volumes" and even if you reference it by folder, or directory, you view a directory, you mount a volume.
    – Allan
    Mar 11, 2020 at 8:38
  • for a new user, manually created volume is a bit far fetched :p
    – anki
    Mar 11, 2020 at 8:38
  • And sorry for the dir/volume confusion ;)
    – hans
    Mar 11, 2020 at 9:37
1

Why does installing a package create a directory on my desktop?

That's not a directory on your Desktop, but the icon for mounted disk image.

As the other answers have aptly mentioned, a lot of apps for macOS are distributed packaged in a disk image (typically a DMG file). Executing (by double-clicking or opening) a DMG file mounts the disk image, and it appears to users just how a mounted disk (external/internal hard drive, thumb-drive etc.) would appear in macOS.

A mounted disk (which could be Mac's built-in hard drive, a connected external USB drive, network storage, or a DMG file) can appear in two places:

  1. User's Desktop.

  2. Topmost level in Finder, under the Computer.

The visibility in the former case can be toggled to show/hide the mounted disk(s). You can do so by opening Finder Preferences (either from the Finder Menu → Preferences... or using the keyboard shortcut Command + ,).

Now in the Finder Preferences window, select the General tab and check/uncheck the External disks item to show/hide the mounted DMG(s) from the Desktop.

Irrespective of whether the External disk visibility is enabled on Desktop, they would always show under the topmost level in Finder under your computer. You can access the topmost level in Finder by using either one of the following three techniques:

Open a Finder window/tab, and:

  1. in the Sidebar, under the Locations item, click on your computer name (16" MacBook Pro in the screenshot below).

  2. use the keyboard shortcut, Command + Shift + C to directly access the Computer.

  3. keep invoking the keyboard shortcut Command + until you reach the topmost level and can see the mounted disk. (Once you reach the top-level) the keyboard shortcut won't work anymore.)

After you have installed the app by copying the .app bundle from the disk, you can and should unmount it. You can unmount a DMG by using either one of the following techniques:

  1. Drag and dropping the mounted disk icon from any of the two locations discussed above to the Trash in the Dock.

  2. Clicking on the eject icon shown alongside the disk name in the Finder Sidebar (as shown in the screenshot above).

  3. Clciking to select the mounted disk image icon and using the keyboard shortcut Command + E to eject.

To answer your specific questions:

When I install a package, it creates a directory with the name of the package on my desktop. In Finder it looks like a new external drive:

Why is that?

The installer you downloaded comes in the form of a DMG file which gets mounted as an External drive. It gets shown on your Desktop, as Finder is by default configured to shown mounted External drives on your Desktop.

Should I always remove those drives after installation?

Yes. Once you are done copying the .app bundle out of the disk image, you should ideally unmount the disk image and either backup the original DMG file for later re-installation of the app, or trash it.

Or did I do something wrong and this should not show up?

You have not done anything wrong and this is by design. The answer above should give you clear explanation about the observed behavior and possible customizations.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .