Skip to content →

macOS Big Sur – easy erase

Wipe and reinstall your macOS system in 20 minutes

Tested on macOS Catalina and macOS Big Sur.

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.

Script in action without a cache disk.
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 Big Sur.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.

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.

Script running with a local InstallAssitant.pkg on /Volumes/macOSCache

The source code of the script is also in my GitHub repo https://github.com/macBerlin/macOS_erase/blob/main/macOS_erase

Disclaimer
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.

Published in Big Sur macOS

2 Comments

  1. Thomas Thomas

    Hello Michael,

    thanks a lot for sharing this, it is really helpful. Would you mind sharing latest.php as well? For our workflow, we cannot depend on your site.

    Thanks,

    Thomas

Leave a Reply

Your email address will not be published. Required fields are marked *