Clear nuget cache

If library’s have the same name you can clear your cache with these commands. This can happen when you are developing and testing a new version of the library.

I downloaded the Nuget executable from then saved it to c:\Data\Nuget

You can save it to any location and add that path to your  Environment Variables’ under “Path” – I didn’t see the value for this exercise.

nuget locals all -list
nuget locals all -clear

Example output:

C:\Users\Carl>cd c:\Data\nuget\

c:\Data\Nuget>nuget locals all -list
http-cache: C:\Users\Carl\AppData\Local\NuGet\v3-cache
global-packages: C:\Users\Carl\.nuget\packages\
temp: C:\Users\Carl\AppData\Local\Temp\NuGetScratch

c:\Data\Nuget>nuget locals all -clear
Clearing NuGet HTTP cache: C:\Users\Carl\AppData\Local\NuGet\v3-cache
Clearing NuGet global packages cache: C:\Users\Carl\.nuget\packages\
Clearing NuGet Temp cache: C:\Users\Carl\AppData\Local\Temp\NuGetScratch
Local resources cleared.


Leave a Reply