3

I have accidentally created two packages and I want to delete one of them. I tried the below command.

sf package delete --package "my-pckg" --target-dev-hub my-dev

But it results into the below error.

Error (1): Can’t delete the package or package version because you don’t have sufficient user permissions. To delete packages or package versions, the Delete Second-Generation Packages user permission must be enabled.

Upon investigating further I found that there is permission for this - Delete Second-Generation Packages (Delete packages and package versions).

I created a permission set with this permission and tried assigning it to my user (from dev hub org).

But now I can't assign this Permission Set to my user. Here is the error I ran into.

Failure : Can't assign permission set Package Delete to user Rahul Gawale. The user license doesn't allow the permission: Delete packages and package versions.

enter image description here

My user license is Salesforce and is a Salesforce Admin. I wonder what license type is required to do this?

Please note that I am using a developer edition org.

1 Answer 1

3

'Delete Second-Generation Packages' can work OK with the following:

User:

  • License: Salesforce Limited Access - Free
  • Profile: Limited Access User

Permission Set:

  • User License: Salesforce Limited Access - Free

enter image description here

enter image description here

1
  • +1 Thanks for the answer, in my developer edition org, there is no license "Salesforce Limited Acess - Free". It seems like it is not available for developer edition orgs according to this article [Determine Which License to Assign to Dev Hub Users ](developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/…)? Commented Mar 22 at 6:25

You must log in to answer this question.

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