-
-
Notifications
You must be signed in to change notification settings - Fork 134
Home
by Graham Pugh
WARNING. This is a self-destruct script. Do not try it out on your own device!
erase-install.sh
is a script to reinstall macOS directly from the system volume using startosinstall
, which is built into macOS installer applications since version 10.12.4. The eraseinstall
option was added with macOS 10.13.4.
The script can be used to download macOS full installers, and to reinstall, upgrade or erase macOS.
Version 28 brings many changes to erase-install.sh. Gone is the reliance on python to run installinstallmacos.py
, instead we now use Nindi Gill's mist-cli. Also gone is the use of osascript
, jamfHelper
or DEPNotify
for notifications and messages, in favour of Bart Reardon's swiftDialog.
Since swiftDialog requires macOS Big Sur 11.0 or newer, and mist
requires macOS 10.15 or newer, version 28 and above of erase-install.sh
has a minimum requirement of macOS 11.
If you are still relying on erase-install.sh to get clients that are running older versions of macOS into a supported state, you should continue to use version 27.x. I will continue to support 27.x until macOS 14 is released, though no new features will be considered.
Erase-install is suitable for use with any or no management systems. It works with the swiftDialog application to provide notifications to the user as downloads and installations progress.
The script has many options to suit a large variety of workflows, management tools and user experiences. Options are supplied as command line arguments. For example, if you wish to use the script to download the latest macOS Big Sur installer and use it to upgrade the system in a single step, you would use the following command:
sudo /path/to/erase-install.sh --reinstall --os 11
The dialog messages have been localised in English, German, French, Dutch and Spanish. Please submit Pull Requests if you wish to supply other languages.
To see all possible commands, run the following:
/path/to/erase-install.sh --help
Please use the Wiki's menu to learn about how to install and deploy the script, as well as all the options for interacting with it.
Note: The "Legacy" sections of the wiki refer to erase-install.sh version 27.x.