Gemini CLI on Mac: what is in ~/.gemini
Last checked 18 October 2026
Gemini CLI stores everything in ~/.gemini. Saved chats in tmp/ grow the most; one user found 46 GB. Checkpoints in history/ exist only if you enabled them. Deleting project folders in either leaves your files untouched. Keep oauth_creds.json, settings.json and GEMINI.md.
What Gemini CLI stores on your Mac
Gemini CLI keeps everything in one folder, ~/.gemini. Most of its weight is in two subfolders: tmp, which holds your saved chats per project, and history, which holds checkpoints if you turned them on. The rest is your login, settings and memory.
| Path | What it is | Verdict | What you lose |
|---|---|---|---|
tmp/ | Saved chats, logs and shell history, one folder per project | Review | Those chats can no longer be resumed with /chat resume or gemini --resume; your project files are not modified |
history/ | Checkpoints of your files, used by /restore | Review | Gemini's edits can no longer be undone with /restore; your files stay as they are |
extensions/ | Your installed Gemini CLI extensions | Review | They would need to be reinstalled |
oauth_creds.json, google_accounts.json | Your sign-in | Never delete | You are signed out |
settings.json, GEMINI.md, commands/ | Your settings, memory and custom commands | Never delete | Your setup |
All paths are inside ~/.gemini.
What grows the most
Saved chats in tmp/. One user found 46 GB in ~/.gemini/tmp, almost all of it in a project's chats folder, where each session file held large inline data. The issue was marked as a duplicate of a report about session logs storing binary data inline.
Checkpoints in history/ can grow too, but only if you enabled them. Gemini CLI's documentation says checkpointing is off by default and is turned on with general.checkpointing.enabled in settings.json. When it is on, Gemini keeps a shadow Git repository per project in ~/.gemini/history/<project_hash>, separate from your own Git history. Another user reported 3.8 GB in that folder after a short session.
To see it on your own Mac:
du -sh ~/.gemini/* 2>/dev/null | sort -h
du -sh ~/.gemini/tmp/* ~/.gemini/history/* 2>/dev/null | sort -h | tail -10Nothing above deletes anything.
How to clean it by hand
Quit every running gemini session first. Cleaning files a session is writing to can corrupt them.
Saved chats: each folder in ~/.gemini/tmp/ belongs to one project. Deleting the folders of projects you are done with frees the most space. Those conversations can no longer be resumed, and your project files are not modified.
Checkpoints: deleting folders in ~/.gemini/history/ means /restore can no longer undo Gemini's edits in those projects. Your files stay as they are, and your project's own Git history is not touched. If you do not use /restore, you can turn checkpointing off in settings.json.
Extensions: removing folders in ~/.gemini/extensions/ frees space, and those extensions would need to be reinstalled.
What you should never delete
oauth_creds.json and google_accounts.json are your sign-in, settings.json your settings, GEMINI.md your memory and commands/ your custom commands. Deleting ~/.gemini as a whole signs you out and removes all of them.
Other command-line agents follow the same pattern: see what is in ~/.codex and what is in ~/.claude. For every agent, see where AI coding agents store data on your Mac.
Doing it with Ouste
Ouste reads ~/.gemini, classifies every item as Safe, Review, Risky or Protected with the sentence that says what you lose, and puts anything you might regret in a 7-day quarantine you can restore in one click. Your sign-in, settings and memory are never touched.
Questions
Can I delete ~/.gemini/tmp?
You can delete the folders of projects you are done with. Their saved chats can no longer be resumed; your project files are not modified. Quit Gemini CLI first.
Why is the .gemini folder so large?
Usually saved chats in ~/.gemini/tmp, where each session is stored as a file. If you enabled checkpointing, the shadow Git repositories in ~/.gemini/history add more.
Is Gemini CLI checkpointing on by default?
No. It is off by default and is turned on with general.checkpointing.enabled in settings.json.
Is it safe to delete the whole ~/.gemini folder?
No. It also holds your sign-in, settings, GEMINI.md memory and custom commands. Delete the project folders inside tmp and history instead.