Force Unlock
Overview
Remove a stale terraform state lock. When a plugin hits a lock error, tfui keeps the lock ID, so u opens this screen with it filled in.
Screenshot

Interactive (TUI)
Press u on a lock error in State or Plan, or type :forceunlock in command mode.
Keybindings
| Key | Action | When |
|---|---|---|
y / Y / Enter |
Confirm unlock | Confirming |
n / N / Esc |
Cancel | Confirming |
ctrl+r |
Retry | Error |
q / Esc |
Back to previous plugin | Always |
Flow
Idle → Confirming → Loading → Done/Error
- If tfui knows the lock from an earlier lock error, it asks to confirm unlocking that lock ID
- Otherwise it asks whether to enter a lock ID by hand, then asks for it
- On confirmation, executes
terraform force-unlock - On success the lock badge clears and the plan is marked stale
qorEscreturns you to the previous plugin
Command Line (CLI)
tfui force-unlock <lock-id> # Asks y/n on the terminal
tfui force-unlock -force <lock-id> # Skip confirmation (CI)
Exit codes: see CLI I/O contract.
Equivalence
| Goal | CLI | TUI |
|---|---|---|
| Remove stale lock | tfui force-unlock <lock-id> |
u from lock error |
| Skip confirmation | tfui force-unlock -force <lock-id> |
N/A (TUI always confirms) |
Related
- State Browser – press
ufrom lock error to reach this plugin - Plan – press
ufrom lock error during planning