HowTo: Clear Nuget cache on a build server

29 May 2015 0 By David

nuget cache clear
teamcity512

Do you need to clear the Nuget cache on a build server which runs as a windows service?
Simply navigate to the nuget cache store which is located in the temp directory for the system service accounts.

C:\Windows\System32\config\systemprofile\AppData\Local\NuGet\Cache
C:\Windows\SysWOW64\config\systemprofile\AppData\Local\NuGet\Cache

Alternatively, you could tell nuget to bypass the nuget cache altogether when it installs packages by using the -nocache option in your install statement

nuget install ninject -nocache