Axeen
Axeen

Reputation: 290

.nuget Folder in User space

Due to a problem with my storage, I need to delete or change location of many folder in my User space, but I see a .nuget folder and I would like to know if there is a way in Visual Studio 2016 to change the location of this folder?

It includes all the packages downloaded for my projects and it takes a lot of space.

Location of the .nuget folder

Upvotes: 22

Views: 14773

Answers (3)

This "Clear All Nuget Cache(s)" will clear all the packages from the default.

You can change the path using NUGET_PACKAGES environment variable

enter image description here

Upvotes: 0

EMalik
EMalik

Reputation: 2515

This is NuGet cache and can be cleared easily. In Visual Studio hover over NuGet Package Manger under Tools Menu and click on Package Manager Settings.

Now click on Clear All NuGet Cache(s).

enter image description here

Upvotes: 5

Harikrishna Menon A
Harikrishna Menon A

Reputation: 455

Set the globalPackagesFolder propety in your nuget.config and you can point this to any location on your drive. For an overview of the NuGet.config file check out our documentation here.

E.g

<configuration>
  <config>
    <add key="globalPackagesFolder" value="..\..\GlobalPackages2" />
  </config>
</configuration>

Upvotes: 14

Related Questions