What is the .gemini folder on your Mac, and is it safe to delete?

Yes, but read this firstDiskmack safety tier: Caution
~/.gemini

Yes, you can delete ~/.gemini, but know what you're giving up first. The folder holds caches, logs, and state for Google's Gemini CLI, including your login and settings. The caches rebuild on their own the next time you run the tool, but you may have to sign in to your Google account again and redo any configuration. If you no longer use the Gemini CLI at all, deleting the folder is fine.

What it is

The .gemini folder in your home directory belongs to the Gemini CLI, Google's command line AI tool. The CLI creates it the first time you run it, whether you installed it properly with npm or just tried it once through npx. Because the name starts with a dot, Finder hides it by default, which is why most people first spot it in a disk scan and have no idea where it came from.

Inside you'll typically find your settings.json, a global GEMINI.md context file the CLI reads on every run, authentication data from your Google sign in, and a tmp directory where the tool keeps session logs and other working files. The settings and credentials stay tiny. The logs and temporary files are what grow, especially with daily use. Even then, this folder is usually measured in megabytes, not gigabytes. If your disk is nearly full, the space is more likely hiding in your npm cache or a node_modules folder than here.

Is it safe to delete?

Deleting ~/.gemini won't break your Mac or any other app. It only affects the Gemini CLI itself. The caches and logs rebuild automatically the next time you run the tool. What doesn't come back for free is your sign in and your settings: expect to authenticate with your Google account again and to recreate anything you customized, like your theme or a global GEMINI.md file.

If you still use the CLI, the smarter move is to clean inside the folder instead of removing all of it. The tmp directory is where the disposable files live, and clearing it keeps your login and configuration intact. If you've stopped using the Gemini CLI entirely, delete the whole folder and uninstall the package too, or one accidental run will quietly recreate it. Diskmack identifies ~/.gemini automatically and cleans it the safe way.

How to check its size

In Finder: In Finder, choose Go > Go to Folder (or press Shift-Command-G), type ~/.gemini and press Return. Then select the folder and press Command-I to see its size on disk.

In Terminal:

du -sh ~/.gemini

The ~ expands to your home folder, so this measures /Users/yourname/.gemini.

How to clean it

  1. Quit any terminal window where the Gemini CLI is running.
  2. In Finder, choose Go > Go to Folder and enter ~/.gemini.
  3. To free space but keep your login and settings, open the folder and drag only the tmp subfolder to the Trash.
  4. To remove everything, go to your home folder instead (Go > Go to Folder, then ~), press Command-Shift-Period to show hidden files, and drag the whole .gemini folder to the Trash.
  5. Empty the Trash when you're ready. The next run of the CLI recreates what it needs.

Deleting the full folder signs you out of the Gemini CLI. You'll go through Google authentication again on the next launch, and any custom settings are gone.

Will it come back?

Yes, as soon as you run the Gemini CLI again. The tool recreates the folder on launch, rebuilds its caches, and starts writing fresh session logs. Growth is gradual and tracks how much you use the CLI: a heavy user might clear the tmp folder every few months, while an occasional user can ignore it for a year. If you deleted the folder because you don't use the tool anymore, uninstall the CLI itself as well (for example, npm uninstall -g @google/gemini-cli), otherwise a single stray invocation brings the folder right back.

Common questions

Will deleting ~/.gemini log me out?

Yes, if you signed in with a Google account: that authentication lives in this folder, so the next gemini command walks you through sign in again. If you use an API key set in an environment variable instead, nothing changes. Caches and logs rebuild on their own either way.

I never installed the Gemini CLI. Why do I have this folder?

Running it even once creates the folder, and npx makes that easy to do without a real install. A tutorial, a coworker's script, or another dev tool may have invoked it on your behalf. If nothing on your Mac uses the Gemini CLI, the folder is safe to remove.

Can I keep my settings but still free the space?

Yes. Delete only the tmp subfolder inside ~/.gemini. Your settings.json, GEMINI.md, and credentials stay put, and the CLI keeps working without a re-login.

Does this folder affect Gemini in my browser?

No. The web version at gemini.google.com stores nothing in this folder. ~/.gemini belongs only to the command line tool, so deleting it changes nothing about Gemini in Chrome or Safari.

Related folders