Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update all packages except one

is there any way to update all packages except one? For instance when I created new project I need to update all packages except jQuery. It should stay at same version.

like image 290
Kadir Avatar asked Jan 09 '23 00:01

Kadir


1 Answers

You could write a custom script for updating the packages like the following and execute it in the package manager console

  $list = Get-package -project {Add project name here}
  for($i=0; $i -lt $list.Length;$i ++ ) { if($list[$i].Id -ne "jquery") { Update-Package -project {Add project name here} $list[$i].Id } }
like image 129
KnightFox Avatar answered Jan 10 '23 13:01

KnightFox