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.
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.