Skip to main content

Remove

Remove a package from the target host:

$ osapi client node package remove --target web-01 --name nginx

Job ID: 550e8400-e29b-41d4-a716-446655440000

STATUS CHANGED ERROR NAME
ok true nginx

Broadcast to all hosts at once:

$ osapi client node package remove --target _all --name nginx

Job ID: 550e8400-e29b-41d4-a716-446655440000

HOSTNAME STATUS CHANGED ERROR NAME
web-01 ok true nginx
web-02 ok true nginx
mac-01 skipped false unsupported platform

JSON Output

Use --json to get the full API response:

$ osapi client node package remove --target web-01 --name nginx --json
{"results":[{"hostname":"web-01","name":"nginx","changed":true,
"status":"ok"}],"job_id":"..."}

Flags

FlagDescriptionDefault
--nameName of the package to removerequired
-T, --targetTarget: _any, _all, hostname, or label (group:web)_all
-j, --jsonOutput raw JSON response