Skip to main content
Question

MacOS Install with EraseInstall & InstallPackage Flags?

  • December 14, 2018
  • 4 replies
  • 34 views

Forum|alt.badge.img+11

If this has already been posted or asked I apologize. I looked here and googled this and got no clear answer on it.

Is it possible to use the EraseInstall and InstallPackage flags with a MacOS Install?

I've found various scripts with packages being called up with the InstallPackage flag and the paths to those packages are in /Users/Shared.

My confusion is that if I'm doing an EraseInstall. Their wouldn't be any packages in the Shared folder. Do I need to put the additional packages in the install media and call that up in the InstallPackages flag?

4 replies

Forum|alt.badge.img+15
  • Valued Contributor
  • December 14, 2018

@ShaunRMiller83 You would pre-stage the additional pkgs you want installed, so many people choose the /Users/Shared folder for that purpose (but it can be somewhere else).

When you run startosinstall --installpackage /path/to/pkg --eraseinstall the operating system does some magic to copy your pkgs to a hidden APFS container so it's "saved" for later. Then after the drive is wiped it can pull those installers for you.


Forum|alt.badge.img+11
  • Author
  • Valued Contributor
  • December 14, 2018

Thanks for the reply... Simple enough. I knew I was over thinking it!

I am going to give that a test now.


Forum|alt.badge.img+5
  • New Contributor
  • April 26, 2019

Any idea if there is a limit to the size of the package?
I'm getting crazy ideas about using this for the Office and Adobe Suites.


Forum|alt.badge.img+10
  • Valued Contributor
  • April 26, 2019

I have seen a demo by an Apple SE who had the full office package installed. I don't recall if he said there was a limit but I don't think there is. You would need to push the packages out before sending the command.