Skip to content

Legacy 5. Downloading (caching) a specific version or build of macOS

Graham Pugh edited this page Jan 15, 2023 · 1 revision

The Apple catalogs maintain multiple versions of the macOS installer. erase-install.sh can download any that is available. By default it will download the latest version available that is compatible with the hardware on which the script is being run.

If you wish to obtain a different installer, you can use one of the options below.

--samebuild

Run the script with argument --samebuild to obtain the installer which matches the current system macOS build (using sw_vers), rather than the latest production installer available.

This allows the reinstallation of a forked or beta version that is already installed on the system volume, so long as that version is still available in the catalog.

--sameos

Run the script with argument --sameos to obtain the installer which matches the currently installed macOS major version, for example 10.15, 11 etc. This basically filters by major version, and looks for the latest build matching the currently installed major version.

This is useful if you want to avoid upgrading during an erase-install workflow, but don't want to have to specify a particular OS.

--os MAJOR_VERSION

Run the script with argument --os=MAJOR_VERSION or --os MAJOR_VERSION to check for the installer which matches the specified macOS major version. This basically filters by major version, and looks for the latest build matching the currently installed major version.

For example, sudo bash erase-install.sh --os=10.14 will obtain the latest version of macOS 10.14 available in the catalog, so long as it is compatible with the system on which the script is being run.

Note that for macOS 11+, --os=11 is treated as the major version rather than 10.x.

Useful during Release Candidate periods.

--version VERSION

Run the script with argument --version=VERSION or --version VERSION (example 10.14.3, 11.3) to check for the installer which matches the specified macOS minor version. This basically filters by version, and looks for the highest build matching the version.

--build BUILD_ID

Run the script with argument --build=BUILD_ID or --build BUILD_ID (example 19A123) to check for the installer which matches the specified build ID, rather than the latest production installer or the same build.

Note that this will only work if the build is compatible with the device on which you are running the script.