Let's say I have a scratch org that has 5 packages (1 to 5).

I wish to retrieve the meta-data from the 3rd package, so I use the mdapi:retrieve command to retrieve the meta-data from the 3rd package.

I unzip the contents in the directory and I see the meta-data from the 3rd package only there (which is good).

However, I also want to retrieve the sfdx-project.json file (or at least, the meta-data that tells me the dependencies of the 3rd package). For example, package 3 is dependent on package 1 and package 2.

QUESTION: Is there a command to target a package and return the "dependencies" parameter from the sfdx-project.json file? Ideally, I'd see something like this:

        "dependencies": [
                "package": "Package1",
                "versionNumber": "0.1.0.LATEST"
                "package": "Package2",
                "versionNumber": "0.1.0.LATEST"

1 Answer 1


I have found that this can help identify the dependencies from a particular package.

This doc is also helpful.

sfdx force:data:soql:query -u [insert either org alias or username alias] -t -q "SELECT Dependencies FROM SubscriberPackageVersion WHERE id='04tXXXXXX' and InstallationKey='ABC'" --json | grep subscriberPackageVersionId

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .