How to delete Goose session history, and what you lose

since 1.10.0 a session is a row in one SQLite file, so let goose remove it rather than deleting files

Goose used to write one JSONL file per session. Since version 1.10.0 it keeps every session in a single SQLite database, sessions.db, and the old .jsonl files stay on disk after the migration without goose managing them any more. So on one machine there can be two places to clear, and deleting a file is the wrong move for the newer one.

Where the sessions are

~/.local/share/goose/sessions/sessions.db            macOS and Linux
${XDG_DATA_HOME}/goose/sessions/sessions.db
%APPDATA%\Block\goose\data\sessions\sessions.db   Windows
$GOOSE_PATH_ROOT/data/sessions/sessions.db           when GOOSE_PATH_ROOT is set

macOS uses the XDG path too, not ~/Library/Application Support: goose resolves its directories with the XDG strategy everywhere except Windows. GOOSE_PATH_ROOT moves config, data and state together, so when it is set it is the only place to look. In the database, the sessions table holds one row per session and messages joins to it on session_id.

Sessions from before 1.10.0 are *.jsonl files in the same sessions directory, one per session. Older installs may also have them under ~/.local/share/Block/goose, or on a Mac under ~/Library/Application Support/Block/goose or ~/Library/Application Support/goose.

How to delete one session

Use goose itself. It shows which sessions match and asks before removing them:

goose session list
goose session remove --session-id <id>
goose session remove -n <name>
goose session remove -r "project-.*"

Run bare goose session remove to pick sessions from a list. In goose Desktop, open Session History, hover over the session and click the trash button; a session deleted there is gone from the CLI too.

Do not edit sessions.db by hand while goose is running. It is live state the client owns, and the messages belong to the session row by id.

How to delete all of it

With goose and goose Desktop closed, removing the database removes every session in it. goose opens it in WAL mode, so take the -wal and -shm files beside it too if they are there:

cd ~/.local/share/goose/sessions
rm -f sessions.db sessions.db-wal sessions.db-shm

The legacy files are separate, because goose no longer manages them. Delete them yourself, one file per session or all at once:

rm ~/.local/share/goose/sessions/*.jsonl

Your extensions and settings live in the config directory (~/.config/goose), not here, so neither command touches them.

What you lose

The messages, the tool calls and their results, and the session's description and working directory. Goose's own docs call removal permanent: there is no archive, and goose session --resume no longer finds a removed session.

Keeping it searchable instead

deja reads sessions.db and the legacy JSONL files, alongside the other agents' histories, into one local index:

curl -fsSL https://raw.githubusercontent.com/vshulcz/deja-vu/main/install.sh | sh
deja "goose session about the migration"

Indexing and search stay local, credentials are stripped, and deja forget removes a session from the index when you do want it gone. A session you removed in goose stays readable with deja show; deja resume says it is no longer in goose's store rather than handing you a command goose will refuse, and deja does not write rows back into sessions.db. DEJA_GOOSE_ROOT and DEJA_GOOSE_DB point deja's reads at a copy or a backup without moving goose.

Where every agent keeps its history · Memory for Goose · The Goose format

Found this useful? Star deja-vu on GitHub.