Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can NuGetScratch directory safely be deleted?

Tags:

Good afternoon,

I'm using a SSD and getting close to running out of room. Upon running WinDirStat (great utility!) I've found the biggest remaining HD space hog is the "NuGetScratch" directory, located at:

C:\Users[user name]\AppData\Local\Temp\NuGetScratch\

Based on the name I'm under the impression that this is a swap/temp type file that could probably deleted without any NuGet ill effects. Can somebody confirm this or provide further information? I'm using Window 10 if that matters.

like image 790
cdahms Avatar asked Dec 10 '16 17:12

cdahms


People also ask

How do I clean my NuGet package?

Open Visual Studio, go to Tools -> NuGet Package Manager -> Package Manager Settings menu. Click Clear All NuGet Cache(s) button in options dialog then clearing process is started. Once NuGet cache location is cleared, click ok button.

What is NuGet folder?

nuget folder is used as a cache for packages downloaded to speed up project restore and compilation. It can safely be removed. Worst case, it will have to download the packages again in the future. Follow this answer to receive notifications.

What is a NuGet package?

Put simply, a NuGet package is a single ZIP file with the . nupkg extension that contains compiled code (DLLs), other files related to that code, and a descriptive manifest that includes information like the package's version number.


2 Answers

Yes, deleting should be fine.

You can also run NuGet.exe locals temp -clear instead of manually deleting the directory.

For more info, see https://docs.nuget.org/ndocs/consume-packages/managing-the-nuget-cache.

like image 108
Oskar Avatar answered Sep 23 '22 18:09

Oskar


Thanks @BillHoag for the informative link.

For everyone else that wants step by step instructions,

1.) This is a Resharper bug. If you have a version of Resharper that's older than 2016.3.2 , go to https://resharper-support.jetbrains.com/hc/en-us/articles/207242355-Where-can-I-download-an-old-previous-ReSharper-version- and download 2016.3.2.

2.) you can clear out the old files via the Nuget package manager console by going to Tools -> Nuget Package Manager -> Package Manager Console , and typing NuGet.exe locals temp -clear , and pressing enter. May take a good 5 - 10 minutes to finish clearing, but it will do the job.

like image 28
Garrett Simpson Avatar answered Sep 23 '22 18:09

Garrett Simpson