Can you stop a Mac OS installer (Mojave) from deleting itself?

drioux
Contributor

Does anyone have any good ideas on how to stop a Mac OS installer (Mojave) from deleting itself after it is done running. With all of the wonderful new 'erase and install' commands available now with APFS it is really nice to have the installer available when you need it.

Meanwhile, I have been having an issue with our upgrade in place policy. Occasionally it errors out, and the installer will delete itself after having tried to run. We then need to copy the whole 6+gb over again. It gets a bit tedious and unnecessary after a while.

I'd like to figure out a way to stop it from auto-removing itself once it has been run, but still leave have the ability to manually remove it when we are ready. I'm assuming there is something buried within the installer that could be removed, but haven't been able to find anything yet.

Anyone? Pretty please?

9 REPLIES 9

Dylan_YYC
Contributor III

I read an discussion around here somewhere that has instructions on how to "stage" the update. Basically one policy command copies the installer from your JSS then after that's been verified successful it runs the installer in another policy a day or so later. Its a multi-step approach so you're not trying to download and install in one go.

drioux
Contributor

That isn't really my problem. I want to keep the installer, even after using it. I do not want it to auto-delete any time it used

Dylan_YYC
Contributor III

Ah gotcha... yeah i dont think there is a whole lot you can do with that. Unless you feel like unpacking the installer and messing with it.

drioux
Contributor

I've been trying... still haven't found the magic switch

landon_Starr
Contributor

I suppose one work around would be to cache it to each machine that doesn't have it via a separate policy and smart group.

larry_barrett
Valued Contributor

I use a program called Install Disk Creator (it's free) and have a USB to carry around with a bootable copy. You could still copy it over without booting to it. I know this doesn't answer your question, but it's the solution I use for your exact problem. :)

garybidwell
Contributor III

I found that the macOS Installer only self deletes when its run from the default /Applications download location
If you move it to something like /Users/Shared/ then it remains there after installation has been completed

Obviously this won't work for erase & install workflows, but it does for in place upgrades if your using the standard installer app

Hugonaut
Valued Contributor II

@garybidwell is correct.

for my environment, I have a hidden directory on end user machines that I stage important installers on, one being the macOS Mojave installer. By placing it in any directory besides /Applications the installer will not delete itself.

part of my provisioning sequence places the latest macos installer in the directory so during re provisioning and running the erase install flag configured for my environment creates a seemless - no nonsense - easy life for the deployment team

I believe the path to what causes the file to eat itself is located here

PATH TO INSTALLER

Install macOS Mojave.app/Contents/Frameworks/OSInstallerSetup.framework/Versions/A/Resources/cleanup_installer

this then kicks off a plist com.apple.installer.cleanupinstaller.plist

i cant seem to find the contents of this plist & not worried enough to reboot & disable sip to get passed the locked file location! but if you REALLY NEED IT in the /applications directory... you can always try to mess with that... but again "I BELIEVE" this is where the settings are stored that remove the installer upon completion.

________________
Looking for a Jamf Managed Service Provider? Look no further than Rocketman
________________


Virtual MacAdmins Monthly Meetup - First Friday, Every Month

drioux
Contributor

Thanks! I'll give this a try