NI Package Manager (NIPM)

cancel
Showing results for 
Search instead for 
Did you mean: 

CLI: how to remove package incl. dependencies

Solved!
Go to solution

Hi,

 

I pretty aware, that this can be a very rocky road....

 

I have a NIPM built with PackageBuilder which consists only of dependencies,

 

If I install it, all my dependencies get insatalled, just as desired.

 

Yet if I 

 

nipkg.exe remove my-fabulous-packet

 

all the dependenices stay where they are, only the particulat packet is removed

Is there an argument for the remove command that I have missed?

 

nipkg remove --force-essential --force-locked

removes NIPM as well which is not what I really want...

 

Cheers

Oli

 

0 Kudos
Message 1 of 3
(593 Views)

At least in the past packages that had no other dependencies but what you were removing would be uninstalled as well. However that might be just a feature of the NIPM GUI, not sure. I would check to see if there are any other packages that are dependent on what your package's dependencies as that would block the removal of them.

__________________________________
Bill Eisenhower
Certified LabVIEW & TestStand Developer
0 Kudos
Message 2 of 3
(579 Views)
Solution
Accepted by topic author Oli_Wachno

Oli -

  • NI Package Manager typically only automatically uninstalls non-visible packages, i.e. with XB-UserVisible attribute set to no or not defined, when the last dependent package is uninstalled.
  • Visible packages, i.e. XB-UserVisible attribute set to yes, must be explicitly uninstalled.
  • However, there is an attribute, XB-AlwaysRemoves, that is not documented externally and you can see in some NI packages like NI Package Builder. The attributes lists packages that will be unconditionally uninstalled when the referencing package is uninstalled. The downside is that any dependent on a package in the list will also be uninstalled. You typically should only list visible packages that no other package will likely directly depend on. Listing a common runtime package will uninstall everything that depends on that runtime.
  • See the below attribute defined for ni-package-builder:
    • AlwaysRemoves: ni-package-builder-teststand-2019-support-x86, ni-package-builder-teststand-2019-support, ni-package-builder-teststand-2020-support-x86, ni-package-builder-teststand-2020-support

Notes:

  • The above attributes with the XB- prefix are what you should define in a control file and nipkg.exe will remove the prefix when packed. 
  • You can add additional attributes to any package post build with LabVIEW, TestStand, or NI Package Builder by using the nipkg.exe unpack command, update the package control file, and then the nipkg.exe pack command.
Scott Richardson
https://testeract.com
Message 3 of 3
(558 Views)