opschain admin authz policies delete
Included from Basic tier
Deletes a policy, addressed by name or id, along with its rule links and
assignments. Without --confirm the command only previews what the delete
would remove, so a bare invocation is always safe:
opschain admin authz policies delete ops-team
would delete authorisation policy "ops-team" (0199c1…): 2 rule link(s), 3 assignment(s)
re-run with --confirm to delete
opschain admin authz policies delete ops-team --confirm
deleted authorisation policy "ops-team" (0199c1…)
Only the links are removed — the standalone rules a policy pointed at survive it. System policies refuse deletion server-side (the 422 detail passes through).
Flags
| Flag | Meaning |
|---|---|
--confirm | Actually delete. Without it the command previews the policy's rule-link and assignment counts and exits 0. |
Exit codes
- 0 — deleted, or previewed.
- 1 — the policy cannot be resolved, or the server refused.
- 2 — usage. Shared named errors:
opschain docs cli/admin-authz-policies.
See also
opschain docs cli/admin-authz-policies-detach-rule— removing one rule instead of the whole policy.