opschain admin licence remove
Included from Basic tier
Deletes one stored licence document — the v2 API's
LicenceService.RemoveLicence — and re-resolves the server's entitlements,
printing the resulting licence status. The licence_id is the document
identifier admin licence show lists in its documents section.
Removal is the explicit admin act that can revert a licensed server to the
built-in Basic tier: once no enterprise document remains, the Basic-tier
limits apply. Expiry alone never reverts the tier — an expired document
merely stops granting, so removing a superseded renewal is housekeeping,
while removing the last enterprise document is a downgrade. An unknown
licence_id is the server's 404.
The verb authenticates as the ordinary logged-in user and requires
permission to update the /licence path, plus a server target
(--server <url>, OPSCHAIN_SERVER, or the active context).
Exit codes
| Code | Meaning |
|---|---|
| 0 | Document removed; the new status printed. |
| 1 | The server refused (e.g. the 404 for an unknown id) or the request failed. |
| 2 | Usage error — missing or extra arguments, or no server target. |
Named errors
the licence lives on a server — pass --server <url> or 'opschain context use <name>'— no server target (exit 2).
Examples
opschain admin licence remove acme-2026.licence
removed licence acme-2026.licence
(The confirmation is followed by the re-resolved licence status —
-o json|yaml prints both as one machine document.)
See also
opschain docs cli/admin-licence-show— the document ids and each document's state.opschain docs cli/admin-licence-apply— the other half of a renewal swap.