I used Visual Studio to do some tests but I have already uninstalled it.
Has the ".nuget" folder (under my user profile) been created by Visual Studio and can I safely remove it now?
If you want to delete/uninstall Nuget package which is applied to multiple projects in your solutions then go to: Tools-> Nuget Package Manager -> Manage Nuget Packages for Solution. In the left column where is 'Installed packages' select 'All', so you'll see a list of installed packages and Manage button across them.
The location of the default global packages folder. The default is %userprofile%\. nuget\packages (Windows) or ~/. nuget/packages (Mac/Linux).
YES you can delete this directory, if you have uninstalled Visual Studio.
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.
Yes, the .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.
Just to follow up on the answer @jessehouwing gave, here is the official documentation explaining the different package folders and how to manage them via supported tooling: https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With