I'm creating a second gen managed package using sfdx and I'm not sure how to add a post-install script. Most information I've come across involves updating the package from within an org. Is this option available to me when creating 2GP packages?

1 Answer 1


Have a look on this stackEchange item: PostInstallScript with second generation package

You can define the postInstallScript and UninstallScript within the file sfdx-project.json or when you use sfdx force:package:version:create

Source: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_customize_installs.htm


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.