Changing package id - best practise

Topics: Ecosystem, General
Jun 18, 2013 at 6:19 AM
I have created a nuget package with my company name as a prefix in the ID like this:


However, I'd like to remove the company name from the package id as it's difficult for users to remember(or know) the company name prefix when using the nuget commandline to install the package, and without the company name, there is no autocompletion.

So. I created a new package with the new Id, and now I have two packages in the repository. With the same name. Sigh.

Ideally I would like to create a 304 redirect from the old package to the new instead of just deleting the old package.
But I guess I will have to rename the TITLE of the old package to some gibberish and in the description tell users to uninstall and reinstall the NEW package.

Any ideas on how to do this in the most sensible way?
Jun 18, 2013 at 1:40 PM
  • Upload a new version of the old package with no binaries or content and exactly one dependency - the new package
  • Unlist the old package
Quite a few of the Microsoft packages that were renamed followed this pattern for renaming packages.
Jun 18, 2013 at 5:47 PM
Thank you very much for your swift reply!
Best regards
Jun 19, 2013 at 5:35 PM
Note that you should actually leave the new (empty) version of the package as listed. That will allow the check for updates to the package to find the new version and "redirect" the consumer to the new package.
Jun 19, 2013 at 5:51 PM
That would leave me with two listed packages with the same name, which is not what I want, is it?
The first package only got about 20 installs, so its the early days yet, so I would consider a sacrifice in order to avoid a double listing.
Jun 24, 2013 at 7:32 PM
Yes, it would leave you with both packages listed. It's up to you, but the decision points are:
  1. Leave it Listed - Allows people who installed the old package to get migrated to the new package, but it clutters search results (you can put "Deprecated" in the title, and mention the new package in the description and/or summary).
  2. Unlist it - Removes the old one from search results, but doesn't help migrate people to the new package
Unlisting it seems reasonable, but if you are going to unlist it then the redirect package doesn't have a lot of value except that the gallery could show the deprecated note with the description calling out the replacement package.
Jun 25, 2013 at 5:04 AM
I am looking on how to change package id when I found this discussion. If I am to upload the new version which would be a better way to do in the old package?