Run Installer (.pkg or .mpkg) without user dialog (silentmode) from console on OS X

Very often, software for OS X is provided as .pkg or .mpkg bundles (the difference is, that .mpkg bundles are more customizable than the .pkg-installers). If you want to install them without clicking through the GUI-user-dialog, you can do this by running the installer from the console in silent mode:

sudo -S installer -verbose -pkg your_installer_file.pkg -target /

The installer will run without showing something on the GUI. You will have to enter your system-administrators password, if the installer needs the rights. You can (but shouldn’t) give the password with the command line (so you can install .pkg in an automated way):

echo <password> | sudo -S installer -verbose -pkg your_installer_file.pkg -target /

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Attention: Your password will be stored among other files in the bash_history!

You shouldn’t use this unless you really know what you are doing!

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

If you enjoyed this post, make sure you subscribe to my RSS feed!

One Response to Run Installer (.pkg or .mpkg) without user dialog (silentmode) from console on OS X

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Get in contact:

Categories