Skip to content

Repository files navigation

Claude Code Chats Delete TUI

1. Overview

Delete and remove Claude Code chat sessions with an interactive terminal UI.

YouTube Presentation

Browse, select, and bulk delete chat histories stored in ~/.claude directory.

Tested with Claude Code v2.1.233.

Chats view

Project view

2. Features

  • Browse chat sessions across all projects, with optional grouped-by-project view
  • Bulk delete with full on-disk cleanup (subagents, tool-results, file-history, tasks, background job state, security and telemetry leftovers, and more)
  • Copy chat UUID to clipboard
  • Keyboard-driven interface with vim keys and fast page navigation
  • Auto-update via GitHub releases

3. What Gets Deleted

Deleting a chat removes its full on-disk footprint, not just the transcript:

~/.claude/
├── projects/<project>/
│   ├── <uuid>.jsonl                          # main transcript
│   ├── <uuid>/                               # subagents/ + tool-results/
│   └── sessions-index.json                   # entry removed (if the index exists)
├── tasks/<uuid>/                             # task state
├── file-history/<uuid>/                      # pre-edit file snapshots
├── session-env/<uuid>/                       # session environment
├── debug/<uuid>.txt                          # debug log
├── security/security_warnings_state_<uuid>.* # security-hook dedupe state + lock
├── telemetry/*<uuid>*.json                   # failed telemetry events
└── jobs/<uuid-prefix>/                       # background session state

For a background session that was forked from the chat being deleted, the copy of the parent transcript it keeps (jobs/<fork>/tmp/parent-transcript.jsonl) is removed too; the fork's own transcript is self-contained and stays usable.

Older Claude Code layouts are still cleaned up when present: todos/<uuid>-*.json, plans/<slug>.md (only if no other chat uses the slug), agents/<agent-id>/memory-local.md, and security_warnings_state_<uuid>.json in the Claude directory root.

Project- and user-scoped state (projects/<project>/memory/, agent-memory/<agent>/, memory-project.md, memory-user.md) is preserved. See docs/deletion-behavior.md for the full breakdown and the confirmation flow.

4. Installation

Quick Install

curl -sSL https://raw.githubusercontent.com/ataleckij/claude-chats-delete/main/install.sh | bash

This will:

  • Detect your platform (Linux/macOS, x64/ARM)
  • Download the latest release binary
  • Verify checksum (SHA256)
  • Install to ~/.local/bin/claude-chats

Requirements: curl or wget (usually pre-installed on Linux/macOS)

Build from Source

See docs/install-from-source.md for manual build instructions (requires Go 1.21+).

5. Usage

claude-chats

Keyboard Controls

See docs/keyboard-shortcuts.md for the full keybinding reference and tips for large chat histories.

6. Updates

The tool checks for updates on startup (once per hour) and prompts you to install when a new version is available. Toggle auto-updates from the Settings tab (press ), or run claude-chats --update for a manual check / --version to see the current version.

To disable auto-updates without opening the TUI, set CLAUDE_CHATS_DISABLE_AUTOUPDATER=1 in your environment.

7. Configuration

On first run, you'll be prompted to specify your Claude directory. Configuration is saved to ~/.config/claude-chats/config.json.

8. Star History

Star History Chart

9. License

MIT

About

No description, website, or topics provided.

Resources

Stars

54 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages