After attempting to delete a promoted package version I got:

Second-generation managed packages that have been promoted to released can’t be deleted

I wish to delete this promoted package because it has been assigned the wrong namespace. There has to be a way to delete the promoted package version specially if it is the first promoted version and it is still not published in the AppExchange publicly.

Does this require contacting Salesforce Support?

1 Answer 1


Namespaces are assigned to packages, not package versions.

You can't delete a managed second-generation package once you've uploaded a released version, but the good news is you don't really need to. It doesn't do anything sitting in your Dev Hub.

Simply create a new package with the correct namespace and upload a version against that package.

  • It is interesting that there is no way to deprecate such a version to prevent installation (something you can do with 1GP).
    – Phil W
    Commented Dec 8, 2023 at 7:15
  • @David Reed having several deprecated packages actually makes it confusing to select the right package version in the Partner Community prior to Sec Review
    – dev4life
    Commented Dec 9, 2023 at 0:00

You must log in to answer this question.

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