Skip to content
How it worksSafetyPricingQuestions
FR · Français Download
← Where AI coding agents store data on your Mac, and what is safe to delete

GitHub Copilot CLI: what is in ~/.copilot and what you can delete

Last checked 19 October 2026

GitHub Copilot CLI stores everything in ~/.copilot. The logs folder is safe to delete. session-state holds your saved sessions: deleting it frees the most space but they can no longer be resumed. Never delete config.json (sign-in), mcp-config.json, agents, skills or settings.json.

What Copilot CLI stores on your Mac

GitHub Copilot CLI keeps everything in one folder, ~/.copilot. Most of its weight is in session-state, which holds your saved sessions. The rest is your sign-in, settings, MCP servers, custom agents and skills.

PathWhat it isVerdictWhat you lose
logs/Copilot's internal logsSafeNothing visible: they are re-created each session
session-state/Your saved sessions, one folder per sessionReviewThey can no longer be resumed with copilot --resume; your project files are not modified
history-session-state/Sessions saved by older versions of the CLIReviewThose old sessions can no longer be resumed
pkg/Packages the CLI downloaded for itselfReviewNot documented by GitHub: check before removing
config.jsonYour sign-in and app stateNever deleteYou are signed out
mcp-config.json, agents/, skills/, settings.jsonYour MCP servers, custom agents, skills and preferencesNever deleteYour setup
command-history-stateCommands you typed, searchable with Ctrl+RNever deleteYour command history

All paths are inside ~/.copilot. If you set COPILOT_HOME, the folder is wherever that variable points.

What grows the most

Saved sessions. GitHub's reference for the configuration directory says session-state/ holds session history and workspace data, organized by session ID in subdirectories, so it gets one more folder every time you start a session. Nothing removes old ones for you.

The same page says log files are re-created each session and deleting them has no functional impact.

To see it on your own Mac:

du -sh ~/.copilot/* 2>/dev/null | sort -h
du -sh ~/.copilot/session-state/* 2>/dev/null | sort -h | tail -10

Nothing above deletes anything.

How to clean it by hand

Quit every running copilot session first. Cleaning files a session is writing to can corrupt them.

Safe items can be deleted directly:

rm -rf ~/.copilot/logs

Saved sessions: deleting folders in ~/.copilot/session-state/ frees the most space. Those sessions can no longer be resumed with copilot --resume or --continue, and your project files are not modified. GitHub notes that sessions synced to GitHub.com are not removed by deleting local files.

Old sessions: ~/.copilot/history-session-state/ comes from older versions of the CLI. Deleting it means those sessions can no longer be resumed.

Packages: GitHub does not document ~/.copilot/pkg/. Leave it unless you know what is inside.

What you should never delete

config.json is your sign-in, mcp-config.json your MCP servers, agents/ and skills/ your custom agents and skills, settings.json your preferences and command-history-state your command history. Deleting ~/.copilot as a whole signs you out and removes all of them.

Other command-line agents follow the same pattern: see what is in ~/.gemini and what is in ~/.claude. For every agent, see where AI coding agents store data on your Mac.

Doing it with Ouste

Ouste reads ~/.copilot, 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 MCP servers are never touched.

Questions

Where does GitHub Copilot CLI store its data on a Mac?

In ~/.copilot, unless you set COPILOT_HOME. Saved sessions are in session-state, logs in logs, and your sign-in in config.json.

Is it safe to delete ~/.copilot/session-state?

Yes for your code: your project files are not modified. You lose the ability to resume those sessions with copilot --resume. Sessions synced to GitHub.com stay there.

Can I delete the Copilot CLI logs folder?

Yes. GitHub says log files are re-created each session and deleting them has no functional impact.

What happens if I delete the whole ~/.copilot folder?

You are signed out and lose your MCP servers, custom agents, skills, settings and command history, along with every saved session.

Ouste does this for you. It finds what your agents leave behind, says what each item is and what you lose, and puts anything you might regret in a 7-day quarantine. Free to scan and clean.

Download Ouste

macOS 14 or later · Apple Silicon

Less noise. More control.

Product

  • How it works
  • Safety
  • Pricing
  • Questions

Information

  • Legal notice and terms
  • Privacy
  • Guides
  • contact@ouste.space

Language

  • Français
  • English
© 2026 Ouste. Published by Adeo Consulting, Paris. macOS 14 or later · Apple Silicon