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".
Remove all packages from all projects in the solution
Be careful: This will uninstall ALL packages in the solution. If
-Forceparameter is used, packages are removed even if dependencies exist.
Get-Package | Uninstall-Package -RemoveDependencies -Force
Remove all packages from a specific project within a solution
Be careful: This will uninstall ALL packages in the project. If
-Forceparameter is used, packages are removed even if dependencies exist.
Get-Package -ProjectName "YourProjectName" |
Uninstall-Package -ProjectName "YourProjectName" -RemoveDependencies -Force