Install a .pkg Package Silently with installer

Deploy macOS installer packages from the command line with no GUI, using the built-in installer tool.

macOSdeploymentinstallerpkgMedium risk
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

RiskMedium risk
!Warning: Package scripts run as root; never install a .pkg whose origin you cannot verify.

04Undo

Undo
$ pkgutil --forget com.vendor.tool

05Sources

Last verified: 2026-09-17 · Category: System & Settings

06Related solutions