Newer Version Available
Retrieve Source from an Existing Managed Package
If you’re a partner or ISV who already has a managed package in a packaging org, you’re
in the right place. You can retrieve that package, unzip it to your local project, and then
convert it to Salesforce DX format, all from the CLI.
Before you begin, create a Salesforce DX project.
- In the project, create a folder to store what’s retrieved from your org, for example, mdapipkg.
-
Retrieve the metadata.
1sfdx force:mdapi:retrieve -s -r ./mdapipkg -u <username> -p <package name>The username can be a username or alias for the target org (such as a packaging org) from which you’re pulling metadata. The -s parameter indicates that you’re retrieving a single package. -
Check the status of the retrieve.
1sfdx force:mdapi:retrieve -u <username> -i jobid - Unzip the zip file.
- (Optional) Delete the zip file.
After you finish, convert the metadata source.