utilities
Reset Beads
Cleanly wipe the beads database and issues while preserving configuration and git tracking.
Reset Beads Database Skill
This skill enables a clean, beads-native reset of the local issue tracking database. Perfect for starting fresh while preserving your project configuration (issue prefix, sync branch, etc.).
When to Use
- ๐๏ธ You want a completely fresh beads database
- ๐ You're reorganizing your issue structure
- ๐งน You accumulated too many test/draft issues
- โจ You want to start setup from scratch
- ๐ You're onboarding and want a clean slate
What Gets Wiped
โ Deleted:
- SQLite database (
beads.db+.shm+.wal) - JSONL issue store (
issues.jsonl) - Interaction logs (
interactions.jsonl) - Daemon state (socket, lock, pid, log files)
- Metadata cache (
last-touched)
โ Preserved (git-tracked):
config.yaml(your issue prefix, sync branch, etc.)PRIME.md(session context)scripts/(custom automation)README.md(documentation)
Quick Usage
# Run the reset skill
./.github/skills/reset-beads/reset.sh
# Verify it worked
bd status
bd list
What It Does
- Stops the daemon - Gracefully terminates any running beads daemon
- Wipes the database - Removes all SQLite files
- Clears issues - Truncates
issues.jsonl - Cleans daemon state - Removes socket, lock, and pid files
- Reinitializes - Runs
bd statusto reinitialize beads - Confirms success - Shows final database status
Post-Reset Workflow
After reset, your beads configuration is fully intact:
# Your issue prefix is preserved
bd create "My first issue after reset"
# Creates: lista-1
# Your sync branch is preserved
bd config get sync.branch
# Shows: beads-sync (or whatever you configured)
# Ready to work
bd ready
Git Integration
The reset is git-clean:
.beads/is already in.gitignorefor database files- No git state is affected
- No commits are created (you own when to commit)
Optional: Track the reset as a milestone
git add .beads/
git commit -m "chore: reset beads database for fresh start"
Troubleshooting
"Daemon already running" after reset?
pkill -9 -f beads.daemon
sleep 2
./.github/skills/reset-beads/reset.sh
Database still has old issues?
# Check if daemon is holding a lock
lsof | grep beads
# Kill it and retry
pkill -9 -f beads.daemon
./.github/skills/reset-beads/reset.sh
Want to preserve one issue?
Before running reset:
bd show lista-123 > backup-issue.json
After reset:
# Manually recreate it
bd create "..." --from-json backup-issue.json
Safety Checks
The script includes these safety measures:
- โ
Verifies
.beads/directory exists - โ Warns before deletion
- โ Shows what will be deleted
- โ Confirms reinit success
- โ Verifies beads daemon healthy afterward
Advanced: Manual Reset
If you prefer manual control:
# 1. Stop daemon
pkill -f beads.daemon
sleep 1
# 2. Delete database files
rm -f .beads/beads.db .beads/beads.db-shm .beads/beads.db-wal
# 3. Clear issues (but keep config)
> .beads/issues.jsonl
> .beads/interactions.jsonl
# 4. Clean daemon state
rm -f .beads/bd.sock .beads/daemon.* .beads/last-touched
# 5. Reinitialize
bd status
See Also
- Beads README - Overview of beads
- PRIME.md - Session workflow context
- config.yaml - Configuration reference