It requires two steps (second is maybe optional, but I always like clean solution)
-
In Explorer open folder where your project resides.
Open packages.config using Notepad.
Find and remove the line that mentions corrupted package name. -
Open folder where your solution resides.
Open subfolder “packages”.
Find folder with corrupted package and remove it.
Note: If you delete wrong package, just enable NuGet restore in Visual studio “Options”, and while enabled, right-click solution and select “Restore missing NuGet packages”