Skip to content

lock release

Release the lock, even if it is held — this is the escape hatch for a stale lock left behind by an interrupted run. Use it only once you’re sure no operation is still running.

Terminal window
nschema lock release <lock-id> # release a specific lock (safe default)
nschema lock release --force # release whatever lock is held

The lock-id is shown by lock status, by lock acquire, and in the error of the operation that was blocked. lock release reads the held lock first and refuses if the id no longer matches, so you can’t accidentally release a legitimate lock.

When you genuinely can’t read the id first (clearing a stale or corrupt lock in CI), pass --force to release whatever lock is held without naming it. Naming a lock-id takes precedence, so a redundant --force alongside one is simply ignored.

  • lock-id — the id of the lock to release, copied from lock status, lock acquire, or the blocked operation’s error. The release is refused if it no longer matches the held lock. Required unless --force is given.
  • --force — release whatever lock is held without naming its id.
  • -y, --auto-approve — skip the confirmation prompt. Required for non-interactive runs.