/clear
Last updated
What is /clear?
The /clear command is a utility tool that removes all previous messages, tool outputs, and file contents from the active conversation history. It wipes the current context, allowing you to start a fresh dialogue with the AI without exiting the application or losing your current working directory settings. This is particularly useful for reducing token costs and preventing "context drift," where the AI might become confused by old instructions or irrelevant code snippets from a previous task.
Free resources to learn /clear
More in stage 7: Skills
/clear: common questions
Can I learn /clear in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain /clear in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this /clear tutorial for beginners?
It is lesson 56 of 109 in the free Claude Code roadmap, in stage 7, Skills. If you are new to Claude Code, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.