Quarantine, History & Undo
Quarantine
Section titled “Quarantine”For plugins that support it, clean --apply moves items into the quarantine folder rather than deleting them.
bekas quarantine listbekas quarantine restore <quarantine_id>bekas quarantine purge # empty it nowItems older than quarantine_retention_days (default 30) are purged automatically at the start of the next clean --apply.
The quarantine folder lives inside bekas’s data directory, which is excluded from every audit so quarantined items are never rediscovered as new candidates.
History
Section titled “History”bekas history # list runsbekas history <run_id> # details for one runbekas history --since 24 # events from the last 24 hoursbekas history --jsonbekas undo # most recent runbekas undo <run_id>bekas undo <run_id> --list # per-item state: restorable/restored/permanent/missingbekas undo <run_id> --item <candidate_id> # restore a single itemundo restores every quarantined item of the run (or, with --item, exactly one). Items removed permanently (plugins without quarantine support, or runs with quarantine disabled) cannot be restored; undo reports how many. --list shows each item’s state with its category and size.
Undo is safe to repeat: items restored by an earlier undo of the same run are reported as already restored and left alone. If an item cannot be restored (for example its quarantined data was purged, or something now exists at the original path) undo and quarantine restore print the reason and exit with status 1. Moves into and out of quarantine across filesystems copy first, so a failure never leaves a half-written copy and the original is only removed after the copy is complete.
Undo beyond quarantine
Section titled “Undo beyond quarantine”Some plugins can undo non-file removals and say so honestly in bekas plugins list (the Undo column). The git.branches plugin records each branch’s commit SHA at discovery when it deletes a branch, undo recreates it from that SHA as long as the commit is still reachable in the repository.
Run reports
Section titled “Run reports”bekas history <run_id> --report run-report.mdExports a readable markdown file: every item acted on with its category, size, reason and current undo state, plus summary counts (restored by a later undo, deleted permanently, still restorable).