How do I view a list of packages installed in a DevHub org using the SFDX CLI?

When I run:

sfdx force:package:installed:list -u DevHub

(where DevHub is the alias of my production org, which IS enabled as Dev Hub and also has 2GP enabled)

I receive this error:

    ERROR running force:package:installed:list:  sObject type 'InstalledSubscriberPackage' is not supported.

    Try this: Packaging is not enabled on this org. Verify that you are authenticated to the desired org and try again. Otherwise, contact Salesforce Customer Support for more information.

This command works on sandboxes, scratch orgs, and a 30-day trial devhub org, but not our current production org.

The goal is to get the packageVersionIds of the packages installed in our org and also to understand how the metadata of the packaging system works within the context of the DevHub.


I have tried the same thing in my Org, I have enabled the DevHub and 2GP, then installed a package and tried to fetch the installed package details using CLI command.

enter image description here

enter image description here

As you can see, it is working fine for me. There may two case:-

  1. Run sfdx:force:org:list command and recheck the authenticated org. Check if 2GP has been enabled or not. If you run this command, the result will come like this:-

enter image description here

  1. If everything is right and yet not working fine, You should raise a case with Salesforce DX team.

Source : Link , Question Author : hessbag , Answer Author : sanket kumar

Leave a Comment