Visual Studio - How to reinstall a nuget package

Trying to uninstall a package just to reinstall it? But ending up in a dependency hell? You could of course ignore dependencies when uninstalling and then install it again. However an easier way to reinstall a package is from the nuget package manager console. A simple command like the following will do the trick:

Update-Package <package-name> -Reinstall


This will also help you fix dll references or install files you might have deleted from the package installation. This will simply reinstall the package as if it is installed for the first time.

I also wrote a post on how to update multiple nuget packages starting with the same name.