-
-
Notifications
You must be signed in to change notification settings - Fork 136
Legacy 1. Installation
- The script must run as root or
sudo
. - macOS 10.12.4 or greater is required for the reinstall workflows.
- macOS 10.13.4 is required for the erase-and-reinstall workflow.
- The file system must be APFS.
- Installers can only be obtained for macOS 10.13 and greater.
The easiest to maintain method of deploying the script is to install the latest package from the Releases page. The package contains the latest copies of erase-install.sh
and the forked installinstallmacos.py
, and will place them on the system in the /Library/Management/erase-install
folder. Using the package ensures that you always have compatible versions of the two scripts and that they are placed in a folder with the correct permissions to operate properly.
Since version 0.23.0, the package installer also includes a bundled, relocatable python 3 framework for use with installinstallmacos.py
. This is preferably used instead of the built-in but deprecated python 2 distribution of macOS. The erase-install.sh
is designed to fallback to the built-in python2 distribution if the relocatable python is not found, but as of macOS Monterey, you may receive warnings or even script failures if you rely on the python2 distribution.
The erase-install.sh
script can be downloaded directly from GitHub. If run as a standalone script, it will download installinstallmacos.py
if required for the workflow.
If you choose to manually deploying the script to clients rather than using the release package, for example via a Jamf policy with the script attached, I recommend using the --force-curl
option to always download the latest version of installinstallmacos.py
. You may also wish to point to a different python framework using the --python-path
option.
You can also run the script directly from GitHub using the following command from Terminal, or with a remote management tool that allows script execution. The sudo
command can be left off if executing from root prompt or through remote management tool that executes commands with root privileges.
curl -s https://raw.githubusercontent.com/grahampugh/erase-install/main/erase-install.sh | sudo bash /dev/stdin <arguments>
Again, if you are using this method, I recommend using the --force-curl
option to ensure that you always have the latest version of installinstallmacos.py
on the client. You may also wish to point to a different python framework using the --python-path
option.