Appendix F
Maintaining Your ~/.claude Directory
The ~/.claude directory stores session data, conversation history, memories, and configuration. Without periodic cleanup, it can grow to 1GB+ within weeks of daily use.
What takes up space
| Directory | Contents |
|---|---|
projects/ | Per-project session data and memory files |
sessions/ | Full conversation transcripts |
memory/ | Auto-memory files persisted across sessions |
Cleanup strategies
- Manual cleanup: Remove old session directories older than 30 days
find ~/.claude/sessions -type d -mtime +30 -exec rm -rf {} + - Check your usage:
du -sh ~/.claude/*/ | sort -rh - Preserve what matters: Back up your
memory/andCLAUDE.mdfiles before cleaning - Automate it: Add a cleanup cron job or shell alias for periodic maintenance
Tip: Session data accumulates fastest — if you run many long sessions daily, check monthly.
Discussion: Community thread on ~/.claude cleanup