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.
| Path | What it is | Verdict | What you lose |
|---|---|---|---|
logs/ | Copilot's internal logs | Safe | Nothing visible: they are re-created each session |
session-state/ | Your saved sessions, one folder per session | Review | They can no longer be resumed with copilot --resume; your project files are not modified |
history-session-state/ | Sessions saved by older versions of the CLI | Review | Those old sessions can no longer be resumed |
pkg/ | Packages the CLI downloaded for itself | Review | Not documented by GitHub: check before removing |
config.json | Your sign-in and app state | Never delete | You are signed out |
mcp-config.json, agents/, skills/, settings.json | Your MCP servers, custom agents, skills and preferences | Never delete | Your setup |
command-history-state | Commands you typed, searchable with Ctrl+R | Never delete | Your 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 -10Nothing 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/logsSaved 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.