Skip to content

Delete a Package

This page provides instructions on how to delete a package in kdb Insights Enterprise using the CLI.

Using the web interface or the CLI

kdb Insights Enterprise has both a web interface and command line interface (CLI). For information on how to delete packages using the web interface, refer to the web interface documentation.

Remove a package

Once you are finished using a package in kdb Insights Enterprise, you can remove it. You can use the help command to provide information regarding the additional options, as follows:

kxi pm rm --help
 Usage: kxi pm rm [OPTIONS] ID [VERSION]                                        

 Remove   a package from kdb+ Insights Enterprise Package Manager service.      

╭─ Authentication option overrides ────────────────────────────────────────────╮
│ --hostname,--url                  TEXT  Insights URL                         │
│ --realm                           TEXT  Realm                                │
│ --client-id                       TEXT  Client id                            │
│ --client-secret                   TEXT  Client secret                        │
│ --auth-enabled/--auth-disabled          Retrieve Bearer Token                │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --teardown                          Teardown the package before removing.    │
│                                     Implicitly removes runtime data          │
│                                     (--rm-data).                             │
│ --output-format   -o  [json|table]  Output format for the list command       │
│ --server-timeout      TEXT          Timeout for Insights server calls        │
│ --help                              Show this message and exit.              │
╰──────────────────────────────────────────────────────────────────────────────╯

Removing a package from kdb Insights Enterprise can be done as follows:

kxi pm rm test-package

Rm with 'test-package' and version=None
╭──────────────┬─────────┬────────────────────────────────┬──────────────────────────────────────╮
│ name          version  owner.name                      id                                   │
├──────────────┼─────────┼────────────────────────────────┼──────────────────────────────────────┤
│ test-package  0.0.1    service-account-test-publisher  add333ad-bdd2-41a9-bcc7-a24fdbee598f │
╰──────────────┴─────────┴────────────────────────────────┴──────────────────────────────────────╯

Delete all locally installed packages and files

This section explains how to delete installed packages and .kxi package files.

You can use the help command to provide information regarding the additional options.

 Usage: kxi package uninstall [OPTIONS] [OBJECTS]...                            

 Uninstall specified locally installed packages and artifacts.                  

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --artifacts                                   Remove available artifacts     │
│                                               rather than installed          │
│                                               packages.                      │
│ --obj-type     [Package|Artifact|Deployment]  Remove available object from   │
│                                               system                         │
│ --force                                       Force uninstall: suppress user │
│                                               confirmation during removal.   │
│ --help                                        Show this message and exit.    │
╰──────────────────────────────────────────────────────────────────────────────╯

Delete installed packages and .kxi package files as follows:

kxi package uninstall all --force
kxi package uninstall all --force --obj-type=Artifact

Next steps