Erase-Install.sh in not executing

Learner
New Contributor II

Hi Everyone, 

I have created a policy for erase-install with the following Files and Processes command: /Library/Management/erase-install.sh --force-curl --reinstall --update --current-user --overwrite --depnotify

The policy ran successfully on my test machine but it did nothing. I checked the logs in Jamf Pro and it says "Result of command: /bin/sh:/Library/Management/erase-install.sh: No such file or directory" 

I can confirm the package is uploaded (erase-install 30.1.pkg). All the mac's in our fleet is Intel based. Also, I'm not sure if erase-install works with Intel Macs.

I am quite new to Apple management and jamf pro, and I'm having trouble making sense of this error whatsoever. 

I appreciate your time and support. Thank you.  

5 REPLIES 5

mickgrant
Contributor III

You said that the erase-install 3.0.1.pkg is uploaded, but are you installing it in the policy where you call the command?

Learner
New Contributor II

Hi @mickgrant. I thought the package is installed automatically once I set the Action to install. 

Learner_0-1692239702695.png

As per the documentation, it only says to upload the package and then run the script. 

Learner_1-1692239850356.png

Also, here's the log details:

Learner_0-1692240397855.png

 

sdagley
Esteemed Contributor II

@Learner That error indicates that erase-install did not actually get installed by your Policy. What version of macOS is currently running on the Macs you're trying to run erase-install on as versions 28 and later require macOS Big Sur and the installer probably won't install on older versions of macOS. And as an additional FYI the --depnotify option is no longer supported.

Learner
New Contributor II

Hi @sdagley . My test mac is running Version 12.1 Monterey. 

I'll remove --depnotify from my command. Thanks heaps. 

Learner
New Contributor II

I think I figured out the issue. It's my fault to not check the requirement of the script beforehand. 

I just opened up the script and it says that one of the requirements is macOS 12.4 whereas I'm running 12.1. 

Learner_0-1692242101468.png

I will now try with an older version of erase-install. 

Thank you, everyone, for your input.