Skip to content

Instantly share code, notes, and snippets.

@semuserable
Created January 10, 2017 12:41
Show Gist options
  • Save semuserable/fbcccbf1d074b2830acae8b26f120e65 to your computer and use it in GitHub Desktop.
Save semuserable/fbcccbf1d074b2830acae8b26f120e65 to your computer and use it in GitHub Desktop.
// Remove all nuget packages from project
$packages = Get-Package -ProjectName MyProjectName;
foreach($package in $packages) {
Uninstall-Package -ProjectName MyProjectName -Id $package.Id -Force
}
// Remove all nuget packages from all projects from solution
foreach($project in $projects) {
$packages = Get-Package -ProjectName $project.Name;
foreach($package in $packages){
Uninstall-Package -ProjectName $project.Name -Id $package.Id -Force
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment