I know I can uninstall-package from the PM console. I got into some dependency issues with another project and I want to start over, and I need to delete all packages in one shot. Is there a way?
Starting in Visual Studio 2017, use the Tools > NuGet Package Manager > Package Manager Settings menu command, then select Clear All NuGet Cache(s).
In exceptional situations such as copyright infringement and potentially harmful content, packages can be deleted manually by the NuGet team.
Tools > Extension Manager > Online Gallery; You will see "Manage NuGet Packages For Solution" and press download. After finishing download, Save your project first, and restart your Visual Studio, that's all.
To get all packages from all projects in the solution use Get-Package
. To get all packages from a specific project use Get-Package -ProjectName "YourProjectName"
.
Be careful: This will uninstall ALL packages in the solution. If
-Force
parameter is used, packages are removed even if dependencies exist.
Get-Package | Uninstall-Package -RemoveDependencies -Force
Be careful: This will uninstall ALL packages in the project. If
-Force
parameter is used, packages are removed even if dependencies exist.
Get-Package -ProjectName "YourProjectName" | Uninstall-Package -ProjectName "YourProjectName" -RemoveDependencies -Force
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