dotnet nuget push "409 Conflict" version already exists in CI
A 409 on push means the exact package version already exists on the feed. Most feeds are immutable, so republishing the same version is rejected rather than overwritten.
What this error means
push fails with "Response status code does not indicate success: 409 (Conflict)" or "already exists" for the package and version being pushed.
error: Response status code does not indicate success: 409 (Conflict).
Package 'Contoso.Utils 1.4.0' already exists on the feed.Common causes
The version was already published
A prior CI run, or a manual push, already uploaded this exact version. The feed will not overwrite an existing immutable version.
The version was not bumped for a new build
CI pushes on every merge but the package version is static, so the second push collides with the first.
How to fix it
Bump the version before pushing
- Increment the package version for each publish (or derive it from the build).
- Pack with the new version.
- Push again; a unique version avoids the 409.
dotnet pack -p:PackageVersion=1.4.1
dotnet nuget push bin/Release/Contoso.Utils.1.4.1.nupkg --source private --api-key ${{ secrets.NUGET_KEY }}Skip duplicates on idempotent republish
If re-pushing the same version is expected, pass --skip-duplicate so an existing version is a no-op instead of a 409 failure.
dotnet nuget push *.nupkg --source private --api-key ${{ secrets.NUGET_KEY }} --skip-duplicateHow to prevent it
- Derive a unique package version from the build (tag, run number, or commit).
- Use --skip-duplicate when republishing is idempotent by design.
- Never rely on overwriting an existing immutable version.