✦ Blog ✦
✦ VIBES ✦

How to Update Claude Code (Step-by-Step Guide)

ARTISANALNO SLEEPHOT FIX
AdTired of typing "the button on the left, no the other one"? Mark the spot with Markagent.

November 16, 2026 Β· 3 min read

How to Update Claude Code (Step-by-Step Guide)

Learn how to update Claude Code to the latest version with this step-by-step guide covering built-in commands, package managers, and verification.

You can update Claude Code right now by running the built-in /update command inside your terminal session or using your original package manager. Staying current prevents deprecated flags and silent API errors from breaking your terminal workflows.

Check your current version before touching anything

You shouldn't run an update blindly until you know what version you're currently running. Open your terminal applicationβ€”iTerm2, Terminal.app, or Windows Terminalβ€”and query the binary directly.

Type this exact command and hit enter:

claude --version

If you get back something like 0.14.2 while the latest release is sitting at 0.21.0, you've got work to do. Skipping this step means you won't know if your eventual update actually pulled the new payload or just re-cached the old one. Look closely at the output string. If the CLI complains that the command doesn't exist, your PATH is broken or the tool isn't installed globally. Fix that path variable before proceeding.

Run the built-in update command for an in-app upgrade

Most modern CLI agents include self-update hooks, and Claude Code is no exception. You don't always need to drop back to npm or brew if the internal router is healthy.

Fire up your CLI session and execute:

/update

This triggers an internal fetch against Anthropic's registry. If permissions are set right on your global node modules or binary directory, it downloads the tarball, unpacks it, and overwrites the stale executable. Watch your terminal output for permission denied errors. If you see EACCES, stop right there. Don't run sudo claude /update. You'll mess up your file ownership and create massive security holes. Switch to a proper node version manager like nvm or fix your npm prefix instead.

Fall back to package managers when self-updates fail

In-app update routines break constantly because of operating system sandboxing or how you originally installed the binary. If /update throws an error, use the exact package manager you used on day one.

If you installed via npm globally, your update path looks like this:

npm install -g @anthropic-ai/claude-code

If you managed it through Homebrew on macOS, bypass the internal CLI entirely:

brew upgrade claude-code

Never mix installation methods. If you installed via Homebrew, don't try to update via npm install -g. You'll end up with two conflicting binaries in your /usr/local/bin versus /opt/homebrew/bin paths, and your shell will execute whichever happens to appear first in your $PATH.

Restart your terminal session to clear stale binaries

Old process memories hang onto outdated executable code even after a successful disk write. You have to kill the active process to load the fresh build into memory.

Close out your current terminal tab or hit Ctrl+C repeatedly until the Claude Code REPL exits completely. Don't just minimize the window. Open a fresh terminal instance to spawn a clean process tree. If you're building complex frontend features where you coordinate terminal commands alongside visual bug fixes, things get messy fast. When you're feeding visual context from a browser back into an AI agent, you need your UI components and your terminal commands pointing to the exact same source files. That's where tools like markagent help bridge the gap between browser elements and agent prompts. Restarting your shell ensures that when your agent reads those prompts, it's executing against the newly patched CLI binaries rather than cached memory pointers.

Verify the installation succeeded with a final version check

Never trust an update until you've printed the version string back to the console. Run the version flag one last time to confirm the registry match.

Execute the check:

claude --version

Compare the output against the official changelog or GitHub releases page. If the number matches, you're done. If the version hasn't changed, your shell is caching the old binary path. Run hash -r on Zsh or rehash on Bash to clear your shell's command location cache. If it still fails, your global bin directory isn't mapped correctly in your .zshrc or .bashrc.

Keep reading