apkg logout
The logout command removes stored credentials for a registry from ~/.apkg/credentials.json. After logging out, commands that require authentication (such as publish, token, and key) will fail until you login again.
Synopsis
Section titled “Synopsis”apkg logout [--registry <URL>]Options
Section titled “Options”| Option | Description |
|---|---|
--registry <URL> | Remove credentials for a specific registry instead of the default |
The --registry flag is a global option available to all commands. When provided, it removes credentials scoped to that registry URL. Without it, credentials for the resolved default registry are removed.
What happens
Section titled “What happens”- APKG resolves the target registry URL using the standard precedence order.
- The credential entry for that registry is deleted from
~/.apkg/credentials.json. - Other credential entries (for different registries) are left untouched.
If no credentials exist for the target registry, the command exits silently.
Examples
Section titled “Examples”Log out from the default registry:
apkg logoutLog out from a private registry:
apkg logout --registry https://registry.internal.example.comVerify you are logged out:
apkg whoamiRelated commands
Section titled “Related commands”| Command | Description |
|---|---|
login | Authenticate with the registry |
whoami | Show the authenticated user |
config | Manage CLI configuration |
token | Manage long-lived API tokens |