This document covers repository scripts that are not part of the normal Release Asset workflow.
scripts/clear-codex-logs.sh is destructive. It creates a SQLite backup, then
deletes rows from ~/.codex/logs_2.sqlite, resets the logs sequence, vacuums
the database, checkpoints the WAL, and removes logs_2.sqlite-wal and
logs_2.sqlite-shm.
Requirements:
sqlite3,lsof, andpgreponPATH.- A local Codex home directory at
~/.codex. - The Codex app and related helper/app-server processes fully stopped.
Before running it:
- Fully stop the Codex app and related helper/app-server processes.
- Ensure
sqlite3,lsof, andpgrepare available. - Run the script with the mandatory
--yesflag. - Review the printed backup path before relying on the backup.
Run from the repository root:
scripts/clear-codex-logs.sh --yesThis script is not safe for casual use.