Can I move a nuget package to a new repository?

I recently archived a dotnet project that was posting a Nuget package to the Github package registry.  I moved the library to a new Github repo in the same organization.  How can I move this package from the archived repository to the new repository, so I can continue to publish it from the new location?

1 Like

Any thoughts on this?

does anyone else need this?

Hi @derekssmith,

Can you try the following:

  1. Download all versions of your .nupkg
  2. Make the original repository private
  3. Delete all package versions
  4. dotnet tool install update gpr -g
  5. gpr push *.nupkg --repository <OWNER/NEW_REPO> -k <PAT with repo, read:packages and write:packages scopes>

You can now publish new packages to the new OWNER/NEW_REPO repository. If you don’t need to keep your old packages, you can skip steps 1, 4 and 5.

I hope that helps!