ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



INSTALLER(8)              BSD System Manager's Manual             INSTALLER(8)

NAME
     installer -- system software and package installer tool.

SYNOPSIS
     installer [-dominfo] [-volinfo] [-pkginfo] [-showChoicesXML]
               [-showChoicesAfterApplyingChangesXML <pathToXMLFile>]
               [-applyChoiceChangesXML <pathToXMLFile>] [-query <flag>] [-allow] [-dumplog] [-help]
               [-verbose | -verboseR] [-vers] [-config] [-plist] [-file <pathToFile>]
               [-lang <ISOLanguageCode>] [-listiso] -package <pathToPackage> -target device

DESCRIPTION
     The installer command is used to install Mac OS X installer packages to a specified domain or volume.
     The installer command installs a single package per invocation, which is specified with the -package
     parameter ( -pkg is accepted as a synonym).  It may be either a single package or a metapackage.  In
     the case of the metapackage, the packages which are part of the default install will be installed
     unless disqualified by a package's check tool(s).

     The target volume is specified with the -target parameter ( -tgt is accepted as a synonym).  It must
     already be mounted when the installer command is invoked.

     For system software installs, the target volume must be a different volume than the one currently run-ning running
     ning the booted system.  See systemsetup (only available on Mac OS X Server) to set the boot volume.

     The installer command requires at least "admin" privileges to run.  If a package requires authentica-tion authentication
     tion (set in a package's .info file) the installer must be either run as root or with the sudo(8) com-mand. command.
     mand.

     The installer is not responsible for rebooting the machine after installing.  Use reboot(8) or
     shutdown(8) -r now to reboot the system.

     The installer displays two forms of output.  The default terse output is intended for parsing by
     scripting languages for automating (or scripting) installs and verbose output providing additional
     information and descriptive error messages.

     A list of flags and their descriptions:

     -dominfo
             Displays a list of domains into which the software package can be installed.  For example:
             LocalSystem or CurrentUserHomeDirectory.  The domains listed are those which are available and
             enabled when the command is run.

     -volinfo
             Displays a list of volumes onto which the software package can be installed.  The volumes
             listed are the mounted volumes available when the command is run.

     -pkginfo
             Displays a list of packages that can be installed onto the target volume.  If a metapackage is
             given as the package source, all of its subpackages are listed.

     -query flag
             Queries a package for information about the metadata.  See -help for supported flags.

     -allow  Allows overriding (in packages which support it) installing older versions of packages over
             newer installed versions.

     -dumplog
             Detailed log information is always sent to syslog using the LOG_INSTALL facility.  -dumplog
             additionally writes this log to standard error output.

     -help   Displays the help screen describing the list of parameters.

     -verbose
             Displays more descriptive information than the default output.  Use this parameter in conjunc-tion conjunction
             tion with -pkginfo and -volinfo information requests to see more readable output.  The default
             output is formatted for scripting.

     -verboseR
             Displays same information as -verbose except the output is formatted for easy parsing.

     -vers   Displays the version of this command.

     -config
             Formats the command line installation arguments for later use.  The output is sent to stdout,
             but can be redirected to a file to create a configuration file.  This configuration file can be
             supplied as the argument to the -file parameter instead of typing a long series of installation
             arguments.  The config file can be used to perform multiple identical installs.

     -plist  Formats the installer output into an XML file, which is sent by default to stdout.  Use this
             parameter for -dominfo, -volinfo, and -pkginfo

     -file pathToFile
             Specifies the path to the XML file containing parameter information in the key/value dictio-nary. dictionary.
             nary.  This file can be used instead of the command line parameters, and supersedes any parame-ters parameters
             ters on the command line.  When you type this parameter, you type the path to the XML file.
             For example:

             installer -file /tmp/configfile.plist

     -lang ISOLanguageCode
             Default language of installed system (ISO format).  This is only necessary when performing a
             system (OS) install, otherwise is it ignored.  There is no verification done to make sure that
             the language being set actually exists on the machine, however the ISO language code is veri-fied verified
             fied to ensure that it is valid.

     -listiso
             Display the list of valid ISO language codes the installer recognizes.

     -showChoicesXML
             Dumps XML of install choices to to stdout.  This XML can be used to construct an XML input file
             for use with -applyChoiceChangesXML and -showChoicesAfterApplyingChangesXML

     -applyChoiceChangesXML <pathToXMLFile>
             Applies the install choice changes specified in the XMLFile to the default choices state in the
             package before installation.  This allows the command-line installer to customize choice selec-tion selection
             tion of what gets installed.  The XML input file format is described below.

             The XML file structure is an array of choiceIdentifier strings.  Each item in the array is tog-gled toggled
             gled (exactly equivalent to a user clicking on that choice's checkbox in the Installer.app's
             user interface).  To turn off a mixed-state item, you will need to put the choice identifier in
             the array twice, since the first "click" will turn it on.

     -showChoicesAfterApplyingChangesXML <pathToXMLFile>
             Applies the install choice changes specified in the XMLFile to the default choices state in the
             package, and then dumps XML of choices to stdout.  The XML dumped is in the same format as the
             XML produced by -showChoicesXML Since changing one choice in a distribution can implicitly
             change other choices, this method provides an avenue for a user to verify that, given a partic-ular particular
             ular XML changes input file, the items to be installed match that user's expectations.

DEVICES
     A device parameter for the target is any one of the following:

     1) Any of the values returned by -dominfo
     2) The device node entry.  Any entry of the form of /dev/disk*.  ex: /dev/disk2
     3) The disk identifier.  Any entry of the form of disk*.  ex: disk1s9
     4) The volume mount point.  Any entry of the form of /Volumes/Mountpoint.  ex: /Volumes/Untitled
     5) The volume UUID.  ex: 376C4046-083E-334F-AF08-62FAFBC4E352

EXAMPLES
     installer -dominfo -pkg InstallMe.pkg

     installer -volinfo -pkg InstallMe.pkg

     installer -pkginfo -pkg DeveloperTools.mpkg

     installer -pkg OSInstall.mpkg -target LocalSystem

     installer -pkg OSInstall.mpkg -target / -lang en

     installer -pkg DeveloperTools.mpkg -target /

     installer -pkg InstallMe.pkg -target "/Volumes/Macintosh HD2"

     installer -pkg InstallMe.pkg -file /tmp/InstallConfigFile

     installer -pkg InstallMe.pkg -target /dev/disk0s5

ENVIRONMENT
     COMMAND_LINE_INSTALL  Set when performing an installation using the installer command.

FILES
     /usr/sbin/installer  Software package installer tool

SEE ALSO
     syslog.conf(5) reboot(8) shutdown(8) softwareupdate(8) sudo(8) systemsetup(8)

HISTORY
     The command line installer tool first appeared in the 10.2 release of Mac OS X.

Mac OS X                        October 2, 2006                       Mac OS X

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.