Second-Generation Managed Packages

Second-generation managed packaging (managed 2GP) ushers in a new way for AppExchange partners to develop, distribute, and manage their apps and metadata. You can use managed 2GP packaging to organize your source, build small modular packages, integrate with your version control system, and better utilize your custom Apex code. With version control being the source of truth, there are no packaging or patch orgs. You can execute all packaging operations via Salesforce CLI, or automate them using scripts. Submit second-generation managed packages for security review, and list them on AppExchange.

Use managed 2GP to create new managed packages. You can’t currently migrate a first-generation managed package to a second-generation managed package.

Another great way to learn about second-generation managed packages, is by taking the Second-Generation Managed Packages Trailhead module.

Second-generation managed packaging addresses the specific needs of AppExchange partners. If you’re a customer or system integrator and you don’t plan to distribute a package to multiple customers, unlocked packaging is the preferred tool. You can use unlocked packages to organize your existing metadata, package an app or extension, or package new metadata. See Unlocked Packages for more information.

Note