This article applies to: ✔️ .NET Core 3.1 SDK and later versions
Contents
Arguments
• CACHE_LOCATION
The 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, glob‐
al packages cache, and the temporary 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.
Description
The dotnetnugetlocals command clears or lists local NuGet resources in the http-request cache, tempo‐
rary cache, or machine-wide global packages folder.
Dotnet Nuget Locals
Thisarticleappliesto: ✔️ .NET Core 3.1 SDK and later versions
Examples
• Displays the paths of all the local cache directories (http-cache directory, global-packages cache di‐
rectory, and temporary cache directory):
dotnet nuget locals all -l
• Displays the path for the local http-cache directory:
dotnet nuget locals http-cache --list
• Clears all files from all local cache directories (http-cache directory, global-packages cache directo‐
ry, and temporary cache directory):
dotnet nuget locals all --clear
• Clears all files in local global-packages cache directory:
dotnet nuget locals global-packages -c
• Clears all files in local temporary cache directory:
dotnet nuget locals temp -c
Troubleshooting
For information on common problems and errors while using the dotnetnugetlocals command, see Managing
the NuGet cache.
2024-10-02 dotnet-nuget-locals(1)
Name
dotnet-nuget-locals - Clears or lists local NuGet resources.
Options
• --force-english-output
Forces the application to run using an invariant, English-based culture.
• -?|-h|--help
Prints out a description of how to use the command.
• -c|--clear
The clear option executes a clear operation on the specified cache type. The contents of the cache di‐
rectories 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|--list
The list option is used to display the location of the specified cache type.
Synopsis
dotnet nuget locals <CACHE_LOCATION> [(-c|--clear)|(-l|--list)] [--force-english-output]
dotnet nuget locals -h|--help
