CLI Reference
pikeway keys remove
Delete a saved key from this machine.
Synopsis
bash
pikeway keys remove --label <label> [--json]
Description
Removes the key with this label from the local config file. If it was the active key, the first remaining key becomes active; if none remain, there is no active key until you add one.
This only forgets the key locally. The key itself still works until you revoke it in the console at
/console/keys.Options
--labelstringrequiredLabel of the key to remove.
Examples
bash
pikeway keys remove --label old # rotate a key: remove, then add the new one under the same label pikeway keys remove --label main && pikeway keys add --label main --key pk-...
Output
Other keys remain
removed old; active: main
Last key removed
removed main
--json
json
{ "removed": "old", "active": "main" }active is null when no keys remain.
Errors and exit codes
| Exit | Message | When |
|---|---|---|
| 2 | missing --label | --label was not given or has no value. |
| 2 | no key labelled "old" | No saved key has this label. Check pikeway keys list. |