Contributor III

Looking to see if I have missed anything...

When creating packages in Casper, I can create PKGs or DMGs. If I create
PKGs, I have three advantages: i can include scripts within the package, the
package can overwrite existing files (if it is scripted to do so within the
PKG), and I can use Apple Remote Desktop to push the PKG. If I create DMGs,
I have a package that can install to all user profiles and, utilizing Pre
and Post Flight through Composer, I can overwrite files.

Personally, I like PKGs, primarily for the scripting and ARD advantages.

Are there any other considerations that you have that helps determines what
format package you use?

Sean Alexander
Macintosh Services Delivery
Lockheed Martin - Enterprise Business Services


Contributor III

DMGs offer self healing and uninstallation. The index also provides for a way to search for files in the DMGs.

I think PKGs are also good for HTTP downloads because they are resumable, but I'm not 100% on that one.

I've always used DMGs unless it was something that was already packaged, but I think that was mostly historical since there was a time PKGs and MPKGs were natively supported I believe.

Craig E

Honored Contributor

We also use DMG by default... also don't forget that DMG gets you FEU/FUT whereas PKG won't do that. Quite useful when needed.



You're correct that each has its advantages and disadvantages. In addition
On 12/21/10 6:08 PM, "Alexander, Sean" <sean.alexander at> wrote:
to what you've found, I'll add these:

  1. Both a .dmg and a .pkg package can be indexed, however, if you have
    scripts in your .pkg file that move files around then indexing is pretty
    much useless. Indexing is important if you want to easily remove the
    contents of a package from a system.

  2. A .dmg package is seen as a single file rather than a folder of files
    like a .pkg package. (JAMF's Composer is not creating the new flat-style
    package introduced by Leopard.) The advantage a .dmg package has is that
    larger files may copy much more quickly to your distribution points than
    .pkg packages.

I personally use .dmg most of the time because of the small file size and
lower overhead when copying between servers. I'll only use the .pkg format
when I need to add scripts.


William Smith
Technical Analyst
Merrill Communications LLC
(651) 632-1492

Esteemed Contributor II

Hi Sean,

We prefer PKG format for many of the same reasons you pointed out. It offers us the most flexibility. We have global helpdesk and desktop support staff who need to be able to double-click an installer Populating existing and future users is a simple matter of putting user level resources in /tmp and using a loop command in the script to copy to all /Users directories and the User Template.

We work with many helpdesk and desktop support techs in different countries who deal with users who may or may not be sitting at a desk on the client's LAN (such as home users, road warriors, etc.). PKG is the only format that works for us when it comes to day to day support.

DKG is great, but limits your options. Only usable in Casper. So we decided to standardize on PKG format. Just one opinion...



Not applicable


If possible, I would love to hear more about this strategy you are using.

- nick

Esteemed Contributor II

Hi Nick,

Sure, here's a sample:

Snapshot shows we need to deploy user level stuff:

/Users/jdoe/Library/Preferences/crap1 /Users/jdoe/Library/Application Support/crap2

So we set up the pkg to dump the above here:


Using a postflight script to copy the stuff to existing/future users:

#!/bin/sh # # Copy from /tmp to existing/future users.

# Copy to User Template and set owner to root. /usr/bin/ditto /tmp/usercrap /System/Library/User Template/English.lproj /usr/sbin/chown root:wheel /System/Library/User Template/English.lproj

# Loop to populate existing user directories, set owner and group too. for i in $(/bin/ls /Users) do /usr/bin/ditto /tmp/usercrap /Users/$i/ /usr/sbin/chown $i:staff /Users/$i/path/to/copy done exit 0

The /tmp directory purges on reboot. Tweak as needed.

Hmmm...bonus points to anyone who can tell us what to do the script to have it IGNORE the /Users/Shared directory? :)

(this is where Steve/Thomas usually chime in with the golden nugget answer!)

We used input from the usual suspects on this list (Steve Wood, Thomas Larkin, etc.)...



Not applicable

This is awesome!
Always had a sneaky suspicion that it was somehow possible!

Thank you all, for the input.

- nick


Yep, this is what I do too for the most part for those items that need
On 12/22/10 11:33 AM, "Don Montalvo" <donmontalvo at> wrote:
deploying to existing users. We're in an AD environment, which means FEU
doesn't work.


William Smith
Technical Analyst
Merrill Communications LLC
(651) 632-1492

Not applicable

We've been using mostly the PKG format because, as of Leopard, Casper seems to have a problem mounting disk images invisibly (even though hdiutil does it fine). We don't want disk images mounting on users' Desktops while we install software.

-- remo del bello | systems administrator | thedesignory | w 562.753.0783 | remo.delbello at

Access Manager: This email is intended only for the person or entity to which it is addressed
and may contain information that is privileged, confidential or otherwise protected from disclosure.
Dissemination, distribution or copying of this e-mail or the information herein by anyone
other than the intended recipient, or an employee or agent responsible for delivering the message
to the intended recipient, is prohibited. If you have received this e-mail in error, please immediately
notify us by calling The Designory Help Desk at (562) 624-0333.

Contributor II

I know this is an old thread but just in case it helps...
Don, try replacing the following line:
for i in $(/bin/ls Users)
for i in $(/bin/ls Users | /usr/bin/grep -v Shared)

Esteemed Contributor II

Yes, very old thread. :) Search through the forum and you'll see most of us are now leveraging dscl for targeting the right folders when looping in scripts.