NuGet File Locations
NuGet directory and file locations across Linux, Mac and Windows operating systems.
See also Managing the Global Packages and Cache Folders
To display the various NuGet cache locations you can run the following command
nuget locals all -list
NuGet Cache
Stores downloaded NuGet packages (.nupkg).
Mac
- ~/.local/share/NuGet/Cache
- ~/.nuget/packages
Windows
- %LocalAppData%\NuGet\Cache
- %UserProfile%\.nuget\packages
Linux
- ~/.local/share/NuGet/Cache
- ~/.nuget/packages
NuGet Configuration
The NuGet.Config file stores user defined NuGet package sources, credentials and proxy settings. The default location for this file is:
Mac ~/.config/NuGet/NuGet.Config
Windows %AppData%\NuGet\NuGet.Config
Linux ~/.config/NuGet/NuGet.Config
Machine Wide NuGet Configuration
Machine wide configurations are used to define NuGet package sources specific to a machine or a particular IDE, such as Visual Studio.
Mac
Windows %ProgramData%\NuGet\Config
Linux
Inside this directory there may be a NuGet.Config file or subdirectories for IDE specific NuGet.Config files. The files are checked for in the following order:
- %ProgramData%\NuGet\Config\IDE\Version\SKU\*.config
- %ProgramData%\NuGet\Config\IDE\Version\*.config
- %ProgramData%\NuGet\Config\IDE\*.config
- %ProgramData%\NuGet\Config\*.config