Clearing the nuget cache for a package

Have you tried consuming a newer version of an internal nuget package before pushing the version to the package repository?

I happen to do that sometimes. I'd expect the pipeline to have pushed the package, but it would have failed.

Now, since nuget caches the response, it's not possible to pull that version anymore until you clear the nuget cache entry for that package.

$ dotnet nuget locals http-cache --list
http-cache: C:\Users\galdin\AppData\Local\NuGet\v3-cache
$ start "C:\Users\galdin\AppData\Local\NuGet\v3-cache"

The last command opens the cache path on file explorer. Search for the package you're trying to restore.

You should see a search result with in the form of PackageName.dat without any version number in the name.
Delete it, and you're golden.