Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Is it possible to install a .pkg using a terminal ? (I wanted to install an app through ssh).

share|improve this question

2 Answers 2

up vote 11 down vote accepted


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).

See man installer for the full functionality.

share|improve this answer
I usually type "sudo installer -pkg /path/to/package.pkg -target /" and it works fine. –  PEM8000 Nov 21 '12 at 14:22
Perfect, thanks to you both. –  Matthieu Riegler Nov 21 '12 at 23:17

If you are looking for a way to install multiple .pkg files via the command line then take a look at installpkg : http://www.lucid.systems/tools/installpkg

share|improve this answer
Welcome to Ask Different. - Be sure to fill out your profile and self-disclose if you are promoting a product you created or are paid to work for/on. –  bmike Dec 6 '14 at 21:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.