Do not confuse home-directory ~/.gemini with project-local .gemini/ folders inside repositories. AI Agent Clean scans the CLI home directory only — not workspace project trees.
Why Gemini CLI cache grows
- tmp workspaces — ephemeral files under
~/.gemini/tmp. - cache trees — regenerable model/tool artifacts under
~/.gemini/cache. - Mixed chat trees — chat JSON can live under tmp hashes; those need exclusion when cleaning cache.
Gemini CLI path table (macOS)
| Path | Typical contents | Safe to clear? |
|---|---|---|
~/.gemini/tmp/ (excluding chats) | Ephemeral cache | Yes |
~/.gemini/cache/ | Regenerable cache | Yes |
~/.gemini/tmp/**/chats/** | CLI chats | Keep (confirm if removing) |
~/.gemini/settings.json | Preferences | Keep |
~/.gemini/oauth_creds.json | OAuth | Keep |
~/.gemini/google_accounts.json | Accounts | Keep |
Project .gemini/ inside repos | Project-local config | Do not bulk-delete as “system cache” |
Exit Gemini CLI before deleting. Prefer Trash. Nested chats folders under tmp are session-like — leave them alone for a safe cleanup.
Step-by-step: manual Gemini CLI cache cleanup
- Exit Gemini CLI — stop active sessions in your terminal.
- Open
~/.gemini— in Finder use Go to Folder, ordu -sh ~/.gemini/*in Terminal. - Clear regenerable cache — remove safe contents under
cacheand non-chat debris undertmp. - Skip chats and auth — leave
**/chats/**,settings.json, and oauth/account files. - Rerun gemini — confirm login still works and caches rebuild as needed.
FAQ
Is it safe to clear Gemini CLI cache on Mac?
Yes for regenerable tmp/cache data when chat trees are excluded. Keep settings and OAuth files.
Where is Gemini CLI cache stored on macOS?
Under ~/.gemini — typically tmp and cache. Project-local .gemini/ folders are separate.
Will cleaning Gemini CLI delete my chats?
Not if you leave tmp/**/chats/** alone. AI Agent Clean protects chats path segments by default.
Automated cleanup with AI Agent Clean
v1.0.1 includes Gemini CLI in AI Agent Cleaner: regenerable cache defaults on; chats require explicit selection and a second safety filter before Trash.
- Open AI Agent Clean and expand Gemini CLI.
- Confirm chat categories stay unchecked.
- Clean selected caches — Trash by default.
See pricing for trial details.
- Never wipe all of
~/.geminiin one shot. - Do not delete oauth/account files unless you plan to re-authenticate.
- Do not mass-delete project
.gemini/folders inside git repos.
Related guides and features
- AI Agent Cleaner — product page
- What’s New in 1.0.1
- Clear GitHub Copilot cache on Mac
- Clear Windsurf cache on Mac
- Clear Cursor cache on Mac
Preview Gemini CLI cache sizes locally — no cloud upload.
Try free for 7 days