3.0.0-beta.41). Features may change before the next stable release.Switch to stable →devices
ak license devices deactivate
Deactivate one device on your AgentKit App license, with confirmation rules and what happens when you deactivate the current device.
Use ak license devices deactivate to remove one device from your AgentKit App
license. The registry revokes that device's session, so it can no longer
validate or use AgentKit Desktop.
Usage
ak license devices deactivate <device-id> [flags]Pass exactly one <device-id>: the id shown by
ak license devices. Surrounding whitespace is trimmed. The id must be
1 to 128 characters from letters, digits, _ and -; anything else, including
. and .., is rejected before any request is made.
Options
| Flag | Default | Description |
|---|---|---|
--registry-url <url> | Environment or release default | Override the AgentKit registry base URL. |
-y, --yes | false | Skip the confirmation prompt. |
Other shared flags are described in CLI conventions.
The command has no --dry-run.
Confirmation
By default the command asks on stderr and reads your answer from stdin:
Deactivate device dev_abc123? This signs it out of AgentKit Desktop. [y/N]:Only y, Y, yes, YES or Yes continues. Anything else, including
empty input, prints [i] cancelled, sends no request, and exits 3.
With --no-interactive or --json, --yes is required. Without it the
command exits 2 before any request, so scripts must state intent:
ak license devices deactivate dev_abc123 --yes
ak license devices deactivate dev_abc123 --yes --jsonWhat it does
- Validates the id, then the confirmation rules above.
- Loads the license-key session from
~/.agentkit/auth/session.json(underAGENTKIT_HOMEwhen set), created byak login --license-key. - Sends
POST /api/agentkit/licenses/devices/<device-id>/deactivatewith your device session token as a bearer credential. - If
<device-id>is the current device, clears the local license session so this machine is signed out of Desktop immediately. The slot is cleared only while it still holds the same token, so a newer login is not wiped.
Deactivating another device signs that machine out remotely and leaves your local session untouched. The operation is idempotent.
Deactivating the current device removes your local license session. Run
ak login --license-key again to reactivate this machine.
Output
Human output on success:
[ok] Device deactivated: dev_abc123
[i] This was the current device; its local license session was cleared.The second line appears only for the current device. --json writes kind
license.devices.deactivate:
{
"schema_version": 1,
"kind": "license.devices.deactivate",
"data": {
"status": "deactivated",
"deviceId": "dev_abc123",
"signedOut": false
}
}signedOut is true when the deactivated device was the current one.
Exit behavior
| Exit | Meaning | Safe next step |
|---|---|---|
0 | Device deactivated. | Run ak license devices to confirm. |
1 | No license-key session, registry mismatch, a registry or network error, a license server without device support, or the device was deactivated but clearing the local session failed. | Fix the cause, then retry; the operation is idempotent. |
2 | Invalid device id, --yes missing in non-interactive or JSON mode, or a flag could not be parsed. | Correct the invocation. |
3 | You declined the confirmation. | Re-run and answer y, or pass --yes. |
With --json, errors use the shared JSON error envelope on stderr.