3

Due to limitations with extension packages and SFDX

  • Must have a package installed to push extension code
  • Inability to view debug logs from base when installed in extension SFDX org

we have had to use 2GP packages for the base and extension depending on the dev circumstances.

We are currently up to beta 245 lol.

Additionally, with multiple devs we have like 20 2GP packages due to lack of controls on creating them.

The question therefore: can an unreleased 2GP package be deleted at all?

The why: Clean up unneeded packages as it is to the point where all of the dead weight is starting to confuse the dev process.

3

At this point, no. Packages, and package versions, cannot be deleted. There's an Idea you should go vote on. Note that you can deprecate packages, which does help with accidentally installing wrong versions, but for now, you'll have to live with your mistakes (by correcting them in a future version). Also, make sure you leave your feedback with the DX team for any other future enhancements you'd like to see.

You can deprecate a version using the following DX command:

sfdx force:data:record:update -s Package2Version -i 05iXX000000XXXXXXX -v "IsDeprecated=true" -u DevHub -t
| improve this answer | |
  • How do you deprecate a 2gp package? I did not see that in the list of packaging commands – Eric Mar 5 at 20:11
  • 2
    Nevermind found it on the idea: sfdx force:data:record:update -s Package2Version -i 05iXX000000XXXXXXX -v "IsDeprecated=true" -u DevHub -t – Eric Mar 5 at 20:13
  • @Eric I'll edit that in to the answer, too. You're right, it's worth being there. – sfdcfox Mar 5 at 20:14

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.