Packages / Software / OS Installer

Tasks

Install software

sudo installer -pkg Brother_PrinterDrivers_ColorLaser.pkg -target /
% sudo installer -pkg ./Xerox_Drivers_5.9.0.pkg -target /
Password:
installer: Package name is Xerox Drivers
installer: Installing at base path /
installer: The install was successful.

https://apple.stackexchange.com/questions/72226/installing-pkg-with-terminal/72227

(to unpack a pakg from a dmg -> hdiutil)

Installer stuck

sudo rm /private/var/db/mds/system/*.lock
sudo killall -1 installd

https://superuser.com/questions/169908/installer-hangs-on-waiting-for-other-installations-to-finish-despite-no-other

Tools

softwareupdate — system software update tool

List updates

% softwareupdate --list
Software Update Tool

Finding available software
Software Update found the following new or updated software:
* Label: Safari15.0CatalinaAuto-15.0
	Title: Safari, Version: 15.0, Size: 90299K, Recommended: YES, 
* Label: Safari14.1.2CatalinaAuto-14.1.2
	Title: Safari, Version: 14.1.2, Size: 91426K, Recommended: YES,

Install updates

% softwareupdate --install Safari15.0CatalinaAuto-15.0
Software Update Tool

Attempting to quit apps: (
    "com.apple.Safari.SafariQuickLookPreview",
    "com.apple.Safari"
)
Waiting for user to quit any relevant apps

Downloading Safari
Downloaded Safari
Installing Safari
Done with Safari
Done.

Mac OS X installer

softwareupdate --list-full-installers

To download the installer

softwareupdate --download --fetch-full-installer

To get a specific version. Not all work though:

softwareupdate --download --fetch-full-installer --full-installer-version 10.15.7
softwareupdate --download --fetch-full-installer --full-installer-version 11.6.1
softwareupdate --download --fetch-full-installer --full-installer-version 12.3.1

Also, a more convenient tool:

https://github.com/munki/macadmin-scripts/blob/main/installinstallmacos.py

Infos and thanks: https://derflounder.wordpress.com/2018/02/27/using-installinstallmacos-py-to-download-macos-high-sierra-installers/

Apple ressource: https://support.apple.com/en-us/HT211683

Create a bootable Mac OS X install USB drive

sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume