How to clear NuGet package cache using command line?

[Orgin]: http://stackoverflow.com/questions/30933277/how-to-clear-nuget-package-cache-using-command-line

First, download the nuget command line tool from here.

Next, open a command prompt and cd to the directory to which nuget.exe was downloaded.

You can list the local caches with this command:

nuget locals all -list

You can clear all caches with this command:

nuget locals all -clear

Reference: https://docs.nuget.org/consume/command-line-reference

shareedit