In the documentation, there is a command sfdx force:package:create. This works. If I then issue the command sfdx force:package:list, it perfectly shows the package I just created. Now the question is, how do i delete this package? I just created this package for testing, it doesn't have any use or meaning at all. I tried force:package:destroy, force:package:delete, force:package:remove, just to try if there are hidden commands out there to do this task, but it doesn't work.


These are the all available package command which we have right now. package Commands.

As of now, we don't have any command which can do this task so you need to manually delete the package from UI. Also the sfdx force:package:create is still in beta so SF might give this command in future but as of now, There is no option available.

  • 1
    hello @tushar-sharma. if UI is the only way right now, would you be kind enough to point me to the right direction on how to do that. I logged in to my trial devhub org and in the UI, i can only see scratch org infos. I cant find the created package infos. – SamuelDev Aug 22 '18 at 6:28
  • @SamuelDev you delete a package from an org in which you have installed it. – Eduard Aug 22 '18 at 7:17
  • @SamuelDev Please check the package in scratch org. – Tushar Sharma Aug 22 '18 at 7:33
  • Hello @Eduard . If you are referring to the org where i installed the package (in this scenario, that would be my trailhead playground org), and then in the quick find box, typing "installed packages", and then inside the installed packages page, uninstalling the package, and further deleting the uninstalled package, yup i have already done that. However, when i run the command force:package:list, the package still exists. The package is already uninstalled and deleted in the destination org. but it is not yet deleted in the DevHub. – SamuelDev Aug 22 '18 at 7:34
  • 1
    The org where the package was created – Eric Aug 22 '18 at 7:41

It cannot currently be done by you. Perhaps Salesforce support could do it if you contacted them.

You can uninstall the package from various orgs as suggested by the previous answer. That does not eliminate the package from your package list.

sfdx force:package:list

... will still show the package even if it is uninstalled from all orgs.

I have created an idea to add this capability to the SFDX cli on the idea exchange. Go vote for it. https://success.salesforce.com/ideaView?id=0873A000000lMYmQAM

  • 1
    This is the correct answer. The answer by @Tushar Sharma misunderstood the question and confused uninstalling a package version with the request to delete a package. – J. Lietzau Oct 22 '18 at 17:41
  • Agreed 100%. Trailhead beta isn't super useful. – Shane Dec 5 '18 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.