function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
eptrainingeptraining 

Unlocked packages names can be reused after total uninstall?

I have a question related to name reusability of unlocked packages.

While going through Salesforce DX trailhead exercises, I've created first package "dreamhouse", installed in playground than uninstall (also the scratch org deleted). Then as challenge asked, I've created "th-dreamhouse" package and installed in playground then uninstall. 

The bottom line is that despite the fact that all "dreamhouse" and "th-dreamhouse" are uninstalled, the cli force:package:list still can see them (WHERE?) and when trying to create another new package "th-dreamhouse" the error is "The package name must be unique for the namespace".

I want to mention that force:package:installed:list --> "No results found".
Any clarifications much appreciated!

 
NagendraNagendra (Salesforce Developers) 
Hi,

Sorry for this issue you are encountering.

May I request you please confirm after uninstalling the package how long did you wait to use the same name for creating a new package?

After an uninstall, Salesforce automatically creates an export file containing the package data, associated notes, and any attachments. When the uninstall is complete, Salesforce sends an email containing a link to the export file to the user performing the uninstall. The export file and related notes and attachments are listed below the list of installed packages.

Note: The package which you have deleted is available for only two days after the uninstall completes, then it's permanently deleted from the server.

If you are using the same name for the new package then I would suggest you wait for two days from the deleted time so that it gets permanently deleted from the server and you can reuse the same name for the new package.

Hope this helps.

Kindly mark this as solved if the reply was helpful so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.

Thanks,
Nagendra
 
eptrainingeptraining
Thank you for your answer. However, in this case I specifically checked the box related to create package (I didn't want any export file to be created, it was an exercise), I then looked into recycle bin to see if I can find the package, but could not find anything. VSCode terminal still show the 2 packages:
=== Packages [2]
NAMESPACE PREFIX  NAME           ID                  ALIAS  DESCRIPTION  TYPE
────────────────  ─────────────  ──────────────────  ─────  ───────────  ────────
                  dreamhouse     0Ho0b000000TN1oCAG         EP Package   Unlocked
                  th-dreamhouse  0Ho0b000000TN23CAG         EP Package   Unlocked

I really don't know where this info comes from.
Nicolas Sanchez 8Nicolas Sanchez 8
I'm facing the same problem right now.
Could you find a solution to this problem?