Last updated on 10. November 2021
Wipe and install the latest macOS system in 20 minutes
Tested on macOS Catalina, macOS Big Sur and macOS Monterey.
In the last few weeks I had to install macOS several times and delete my test devices again.
To prevent the 12 GB download every time i cached the installer on an external disk.
After only a few days I realised that the installer is already outdated again and that this idea requires a lot of effort, especially if you have prepared several cache disks.
Therefore I decided to solve the problem on the server side, only to discover that the server-side cache of 12 GB is not particularly practical, especially in the mobile office.
The result is that I have opted for a combined solution with a server side script.
sudo bash < <( curl -sL wipe.it-profs.de)
- Check if the user is authorised for the installation.
- Check if a cache disk exist named “macOSCache”
- Check free disk space.
- Use the installer from the cache disk if exists.
- After installation the Install macOS Monterey.app i check the version.
- I compare the latest server version with the local version .
- Save installer on cache disk if the disk exists.
- Ask for update the cached installer if it exists.
This script will also work with the new Apple Silicon ARM64 (M1) generation but there is a limitation in recovery mode. Currently, the eraseinstall command does not work in option mode, so only the installer is loaded and you have to start the installation manually. But this also saves you an enormous amount of time. (I recommend to use the new built-in erase functions in system preferences if you have access to the system)
In this script, two additional parameters are retrieved. For this purpose I have built a small service that provides me with the current URL for the InstallAssitant.pkg and the InstallInfo.plist. You can also build this service yourself/statically.
The source code of the script is also in my GitHub repo https://github.com/macBerlin/macOS_erase/blob/main/macOS_erase
The published information has been carefully compiled, but does not claim to be up-to-date, complete or correct. No liability is assumed for damages resulting from the use of this script or the information drawn from it. This also applies to third-party content accessible via this offer.