Skip to main content
Version: v5.6.1

opschain triggers delete

triggers

opschain triggers delete <project>/<code>

Deletes a trigger (DELETE /api/projects/{project}/triggers/{id}). Its firing history goes with it — to stop a trigger while keeping its definition and firings, use triggers disable instead, and to keep a restorable copy, triggers export the definition first.

On success: deleted trigger <project>/<code>. Needs a server target (--server <url>, OPSCHAIN_SERVER, or the active context).

Exit codes​

CodeMeaning
0Trigger deleted.
1The command failed (trigger not found, server refused the delete).
2Usage error — malformed address, no server target.

Named errors​

  • expected <project>/<trigger-code>, got "<arg>" — exit 2.
  • trigger "<code>" not found in project "<project>" — exit 1.

See also​

  • opschain docs cli/triggers-disable — pause instead of delete.
  • opschain docs cli/triggers-export — a backup that triggers import can restore.