​​ ​

The Apple Support Community will permanently close on November 20, 2026. Starting today, the site will no longer accept new posts and is available in a read-only state.


You can continue to find trusted guidance and support on the official Apple Support site. 


We want to thank the community members who have contributed their time and expertise to help others with their Apple products.


Run Preinstall Script in PackageMaker

I'm using PackageMaker to install an app update and want to add a preinstall script to delete some files in the

/Applications/
folder. The script is simply:

#!/bin/bash rm /Applications/...

etc.

If I run this script with Terminal using

bash preinstall.sh

it works fine.

However, when I add it to PackageMaker and run the .mpkg file the script opens in Text Edit but does not run. How do I get it to run but not open?

Posted on Feb 17, 2013 10:22 AM

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Run Preinstall Script in PackageMaker

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.