[FEATURE] Add CLI command to delete conversation sessions
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Feature Request
Currently, Claude Code has no built-in way to delete individual conversation sessions from the CLI. The only options are to resume or list sessions via claude
--resume, but there is no delete functionality.
Proposed Solution
Add a CLI flag or command to delete a specific session or all sessions, for example:
claude --delete <session-id>
claude --delete --all
Alternative Solutions
Current Workaround
Manually locating and deleting session files from ~/.claude/projects/, which is error-prone and not user-friendly.
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
Use Case
- Cleaning up old or irrelevant sessions to reduce clutter
- Removing sessions that contain sensitive or outdated context
- Managing disk space from accumulated session files
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗