Last Updated on July 20, 2023
The command dotnet nuget locals all --clear
clears all local NuGet resources in the http-request cache, temporary cache, and machine-wide global packages folder.
The dotnet nuget locals
command has two options: -c
or --clear
and -l
or --list
. The -c
option clears the cache, and the -l
option lists the cache.
The all
argument in the command tells the dotnet nuget locals
command to clear all three types of cache: http-request cache, temporary cache, and machine-wide global packages folder.
To clear the NuGet cache using the command line, you can run the following command:
dotnet nuget locals all --clear
This command will clear all local NuGet resources, including the http-request cache, temporary cache, and machine-wide global packages folder.
Note: If you are using Visual Studio, you can also clear the NuGet cache from the Tools menu. In the NuGet Package Manager menu, select Package Manager Settings. In the Options dialog, click the Clear All NuGet Cache(s) button.