What is PKG?

PKG files are macOS installer packages - archive bundles containing software payload, installation scripts, and metadata managed by macOS Installer.app. Used when apps need system-level access, install kernel extensions, place files in multiple locations, or require configuration beyond simple .app drag-and-drop. PKG format supports pre/post-installation scripts, custom UI, license agreements, and component selection. Can install to system directories requiring admin privileges.

PKG is the standard for system software, drivers, utilities, and enterprise applications on macOS. Used by Apple for macOS updates, printer drivers, developer tools (Xcode Command Line Tools), and system extensions. Third-party software like Adobe Creative Suite, Microsoft Office, and database systems use PKG for installation. Enterprise deployment tools (Jamf, Munki) rely heavily on PKG. Notarization and code signing ensure security. PKG files open automatically with Installer.app.

Did you know? PKG installers can place files across the entire macOS system!

History

Apple developed the PKG format for Mac OS X to handle complex software installations requiring system-level access and multi-location file placement.

Key Milestones

  • 2001: Mac OS X PKG format
  • 2009: Flat package format (.pkg)
  • 2012: Gatekeeper integration
  • 2016: Notarization requirements
  • 2020: Apple Silicon support
  • Present: System software standard

Key Features

Core Capabilities

  • System Installation: Admin privileges
  • Scripts: Pre/post-install automation
  • Custom UI: Installation wizards
  • Component Selection: Modular installation
  • Code Signing: Security verification
  • Receipts: Installation tracking

Common Use Cases

System Software

Drivers, extensions

Enterprise Apps

Corporate deployment

Printer Drivers

Device software

Security Tools

Antivirus, VPN

Advantages

  • System-level installation capability
  • Pre/post-install script support
  • Custom installation UI
  • Component selection options
  • Installation receipts for tracking
  • Enterprise deployment standard
  • Code signing and notarization

Disadvantages

  • macOS-only format
  • Requires admin privileges
  • Complex to create properly
  • Can modify system files
  • Harder to uninstall than .app
  • Notarization required for distribution

Technical Information

Format Specifications

Specification Details
File Extension .pkg
MIME Type application/x-newton-compatible-pkg
Format XAR archive (flat package)
Components Payload, scripts, PackageInfo.xml
Receipts /var/db/receipts/
Opener Installer.app (built-in)

Common Tools

  • Installation: Double-click (Installer.app), installer command
  • Creation: pkgbuild, productbuild, Packages.app
  • Inspection: pkgutil --expand, Suspicious Package
  • Signing: productsign, notarytool