Loading
Ongoing maintenance for Salesforce HelpRead More
PHP Vulnerability Monitoring Read More

Salesforce 2GP Managed Package: Unable to Retrieve a Package From the Destination Dev Hub When It Was Not Transferred Through the 2GP Package Transfer Process From the Source Dev Hub

Publish Date: Oct 13, 2026
Description

A 2GP (second-generation managed package) cannot be retrieved from a destination (new) Dev Hub org through the Salesforce CLI or other package recovery methods if the package was not transferred through the 2GP Package Transfer process before the source (old) Dev Hub was deleted.

When the source Dev Hub is deleted, package recovery is not possible. The customer must recreate the package in a destination Dev Hub.

Resolution

This article explains why a Salesforce 2GP managed package cannot be retrieved from a destination Dev Hub when it was not properly transferred from the source Dev Hub, and what to do next. If the source Dev Hub is deleted, the customer must recreate the package in an active Dev Hub. If the source Dev Hub is still active, the package can be transferred using the supported 2GP Package Transfer process.

Why a 2GP Package Is Tied to Its Dev Hub

2GP packages are associated with the Dev Hub that owns them. The package management metadata required to build, view, and manage the package is maintained in that Dev Hub.

Why Authorizing the Salesforce CLI Against a Different Dev Hub Does Not Work

Authorizing the Salesforce CLI against a different Dev Hub does not make the existing package available. The package must first be transferred to the destination (new) Dev Hub through the supported 2GP Package Transfer process, which moves the required metadata.

What Happens If the Source Dev Hub Is Deleted

If the source Dev Hub is deleted before the package is transferred, the package cannot be retrieved from another Dev Hub through the Salesforce CLI or other package recovery methods. The ability to build and manage the package is lost, and 2GP Package Transfer is no longer possible.

Next Steps Based on the Source Dev Hub Status

When the source (old) Dev Hub has been deleted, the customer must recreate the package in an active Dev Hub. If the source (old) Dev Hub is still active, the package can be transferred using the supported 2GP Package Transfer process, subject to its requirements.

Knowledge Article Number

005393434

 
Loading
Salesforce Help | Article