1dotnet-nuget-locals(1) .NET Documentation dotnet-nuget-locals(1)
2
3
4
6 This article applies to: ✔️ .NET Core 3.1 SDK and later versions
7
9 dotnet-nuget-locals - Clears or lists local NuGet resources.
10
12 dotnet nuget locals <CACHE_LOCATION> [(-c|--clear)|(-l|--list)] [--force-english-output]
13
14 dotnet nuget locals -h|--help
15
17 The dotnet nuget locals command clears or lists local NuGet resources
18 in the http-request cache, temporary cache, or machine-wide global
19 packages folder.
20
22 • CACHE_LOCATION
23
24 The cache location to list or clear. It accepts one of the following
25 values:
26
27 • all - Indicates that the specified operation is applied to all
28 cache types: http-request cache, global packages cache, and the
29 temporary cache.
30
31 • http-cache - Indicates that the specified operation is applied only
32 to the http-request cache. The other cache locations aren’t af‐
33 fected.
34
35 • global-packages - Indicates that the specified operation is applied
36 only to the global packages cache. The other cache locations
37 aren’t affected.
38
39 • temp - Indicates that the specified operation is applied only to
40 the temporary cache. The other cache locations aren’t affected.
41
43 • --force-english-output
44
45 Forces the application to run using an invariant, English-based cul‐
46 ture.
47
48 • -?|-h|--help
49
50 Prints out a description of how to use the command.
51
52 • -c|--clear
53
54 The clear option executes a clear operation on the specified cache
55 type. The contents of the cache directories are deleted recursively.
56 The executing user/group must have permission to the files in the
57 cache directories. If not, an error is displayed indicating the
58 files/folders that weren’t cleared.
59
60 • -l|--list
61
62 The list option is used to display the location of the specified
63 cache type.
64
66 • Displays the paths of all the local cache directories (http-cache di‐
67 rectory, global-packages cache directory, and temporary cache direc‐
68 tory):
69
70 dotnet nuget locals all -l
71
72 • Displays the path for the local http-cache directory:
73
74 dotnet nuget locals http-cache --list
75
76 • Clears all files from all local cache directories (http-cache direc‐
77 tory, global-packages cache directory, and temporary cache directo‐
78 ry):
79
80 dotnet nuget locals all --clear
81
82 • Clears all files in local global-packages cache directory:
83
84 dotnet nuget locals global-packages -c
85
86 • Clears all files in local temporary cache directory:
87
88 dotnet nuget locals temp -c
89
90 Troubleshooting
91 For information on common problems and errors while using the dotnet
92 nuget locals command, see Managing the NuGet cache.
93
94
95
96 2022-10-10 dotnet-nuget-locals(1)