Nóta
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað aðskrá þig inn eða breyta skráasöfnum.
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað að breyta skráasöfnum.
This article applies to: ✔️ .NET 6 SDK and later versions
Name
dotnet nuget locals - Clears or lists local NuGet resources.
Synopsis
dotnet nuget locals <CACHE_LOCATION> [(-c|--clear)|(-l|--list)] [--force-english-output]
dotnet nuget locals -h|--help
Description
The dotnet nuget locals command clears or lists local NuGet resources in the http-request cache, temporary cache, or machine-wide global packages folder.
Arguments
CACHE_LOCATIONThe cache location to list or clear. It accepts one of the following values:
all- Indicates that the specified operation is applied to all cache types: http-request cache, global packages cache, temporary cache, and plugins cache.http-cache- Indicates that the specified operation is applied only to the http-request cache. The other cache locations aren't affected.global-packages- Indicates that the specified operation is applied only to the global packages cache. The other cache locations aren't affected.temp- Indicates that the specified operation is applied only to the temporary cache. The other cache locations aren't affected.plugins-cache- Indicates that the specified operation is applied only to the plugins cache. The other cache locations aren't affected.
Options
--force-english-outputForces the application to run using an invariant, English-based culture.
-
-?|-h|--helpPrints out a description of how to use the command.
-c|--clearThe clear option executes a clear operation on the specified cache type. The contents of the cache directories are deleted recursively. The executing user/group must have permission to the files in the cache directories. If not, an error is displayed indicating the files/folders that weren't cleared.
-l|--listThe list option is used to display the location of the specified cache type.
Examples
Displays the paths of all the local cache directories (http-cache directory, global-packages cache directory, temporary cache directory, and plugins cache directory):
dotnet nuget locals all -lDisplays the path for the local http-cache directory:
dotnet nuget locals http-cache --listDisplays the path for the local plugins cache directory:
dotnet nuget locals plugins-cache --listClears all files from all local cache directories (http-cache directory, global-packages cache directory, temporary cache directory, and plugins cache directory):
dotnet nuget locals all --clearClears all files in local global-packages cache directory:
dotnet nuget locals global-packages -cClears all files in local temporary cache directory:
dotnet nuget locals temp -cClears all files in local plugins cache directory:
dotnet nuget locals plugins-cache -c
Troubleshooting
For information on common problems and errors while using the dotnet nuget locals command, see Managing the NuGet cache.