How to clear context in Gemini CLI?

To clear context in Gemini CLI, type /clear and press Enter; Google’s command reference says it clears the active conversation history and starts a new session, along with the visible screen and scrollback.

As of December 5, 2026, the Gemini CLI documentation describes these options:

  • /clear: resets the agent conversation context and starts a new session. Older versions of the docs described it as a screen clear only, so update Gemini CLI if it behaves differently.
  • Ctrl+L: clears and redraws the terminal display only. The active conversation context is kept.
  • /compress: replaces the entire chat context with a summary, which saves tokens while keeping a high-level record of the work.
  • /rewind (or Esc twice): steps back through the conversation, with a choice to rewind history, revert code changes, or both.
  • /resume (alias /chat): saves and reopens checkpoints, so you can return to an earlier conversation.

Instructions loaded from GEMINI.md files are managed separately with /memory.

Related: How to check context usage in Gemini CLI?, What is the Gemini CLI context window? and How to clear context in Claude Code?

Source: Gemini CLI docs, CLI commands

Image: Google Gemini logo by Google LLC, public domain (trademarked), via Wikimedia Commons. Placed on a white background and resized. Gemini and Google are trademarks of Google LLC. FreeAnswers is not affiliated with or endorsed by Google.



Related answers

Leave a Comment