Install a .pkg Package Silently with installer
Deploy macOS installer packages from the command line with no GUI, using the built-in installer tool.
Run `sudo installer -pkg <path-to-package>.pkg -target /` to install a package from the Terminal.
01Command
Command
$ sudo installer -pkg ~/Downloads/Tool.pkg -target /02What it does
The installer command drives the same package engine as the GUI Installer app, so it honors package scripts, receipts, and signing checks. `-target /` installs to the boot volume, which is what nearly every package expects. Add `-verbose` to watch progress, and `pkgutil --pkg-info <id>` afterwards to confirm the receipt was recorded.
03Risk
!Warning: Package scripts run as root; never install a .pkg whose origin you cannot verify.
04Undo
Undo
$ pkgutil --forget com.vendor.tool05Sources
- INSTALLER Command: Install software packages in macOSEvidence: Documents installer -pkg <path> -target / for command-line package installation and -dominfo/-verbose output flags.
- PackageMaker User Guide (Legacy)Evidence: Apple's legacy documentation on macOS installer packages, the format the installer command consumes.
Last verified: 2026-09-17 · Category: System & Settings