How to Update Claude Code (and Check Your Version)
Run claude update. Native installs also update themselves. If you installed with npm, run npm install -g @anthropic-ai/claude-code@latest, then check with claude --version.

On this page
- How to update Claude Code (quick answer)
- How do you check which Claude Code version you have?
- How do you update Claude Code installed with npm?
- What does claude update do on an npm install?
- Does Claude Code update automatically?
- Can you choose a slower, steadier update channel?
- How do you turn off Claude Code auto-updates?
- Why is my Claude Code update failing?
- Why updating matters for security
- After you update: a 2-minute pre-launch check
- FAQ
- Updated? Scan your app before launch.
How to update Claude Code: run claude update. If you used Anthropic's native installer, Claude Code also updates itself in the background, so you may already be current. If you installed with npm, run npm install -g @anthropic-ai/claude-code@latest instead. Either way, confirm it worked with claude --version.
By Gary, Greenlight My App · Updated Oct 22, 2026 · How we checked this: commands and settings come from Anthropic's setup docs (external) and install troubleshooting docs (external), read on Oct 22, 2026. We ran an npm install of an older release, then npm install @anthropic-ai/claude-code@latest, claude update and claude doctor ourselves on a Linux test machine, in a throwaway folder and without signing in. We tested the install and update commands only, not Claude Code's coding features. Drafted with AI tools and reviewed by a person before publishing.
How to update Claude Code (quick answer)
Pick the line that matches how you installed it. The Claude Code update command differs by install type (setup docs (external)):
| How you installed | Updates itself? | Update command |
|---|---|---|
| Native installer (macOS, Linux, WSL, Windows) | Yes, in the background | claude update |
npm (npm install -g) | Tries to (see below) | npm install -g @anthropic-ai/claude-code@latest |
| Homebrew | No, by default | brew upgrade claude-code or brew upgrade claude-code@latest (match your cask) |
| WinGet (Windows) | No, by default | winget upgrade Anthropic.ClaudeCode |
| apt (Debian, Ubuntu) | No | sudo apt update && sudo apt upgrade claude-code |
| dnf (Fedora, RHEL) | No | sudo dnf upgrade claude-code |
| apk (Alpine) | No | apk update && apk upgrade claude-code |
| VS Code extension | Through the editor | Update the extension in the Extensions view |
Then run:
claude --versionWhen claude update installs something, Anthropic's docs say it prints Successfully updated from <old version> to version <new version>. If you're already current, it prints Claude Code is up to date (<version>).
Which update command do I use? Original diagram by Greenlight My App.
How do you check which Claude Code version you have?
Run claude --version in your terminal. It prints the version number followed by "(Claude Code)". For example, on our test machine before updating:
$ claude --version
2.1.293 (Claude Code)
To see whether that's the latest version, compare it with the newest entry on the Claude Code releases page (external), or let claude update tell you. If you use the VS Code extension, Anthropic's VS Code docs (external) say "the extension's version number is the Claude Code version it bundles," so the Extensions view shows it.
For a fuller picture, claude doctor shows how Claude Code was installed, whether auto-updates are on, and the result of the last update attempt (more on that below).
How do you update Claude Code installed with npm?
Use npm install -g @anthropic-ai/claude-code@latest. Anthropic's setup docs say: "Avoid npm update -g, which respects the semver range from the original install and may not move you to the newest release." They also warn: "Do NOT use sudo npm install -g," because it can cause permission problems and security risks.
Here's what happened when we did it. On Oct 22, 2026, we installed an older release, 2.1.293, into a throwaway folder (not a global install, so nothing else on the machine changed), then updated it with npm:
npm install --prefix /tmp/cc-proof @anthropic-ai/claude-code@latest| Before | After | |
|---|---|---|
claude --version | 2.1.293 (Claude Code) | 2.1.308 (Claude Code) |
| npm output | "changed 2 packages … found 0 vulnerabilities" |

On your own machine, the global version of that command is the one from the docs: npm install -g @anthropic-ai/claude-code@latest.
Our test machine had Node 20, and npm printed an EBADENGINE warning because the package asks for Node 22 or later. Anthropic's docs say that on an older Node, npm "prints an EBADENGINE warning during install rather than failing; the install completes and claude still runs." That's what we saw.
What does claude update do on an npm install?
We also tried claude update on the old 2.1.293 copy, without signing in. It worked without sign-in and printed:
New version available: 2.1.308 (current: 2.1.293)
Installing update...
Using global installation update method...
Successfully updated from 2.1.293 to version 2.1.308
claude update said it succeeded.
But when we checked, the copy we had run was still 2.1.293. The update had gone into a separate, global npm install instead. (We removed that extra copy right away.)

The lesson for anyone with a non-standard npm setup: after claude update, run claude --version again and which -a claude to make sure the claude on your PATH is the one that changed.
Does Claude Code update automatically?
Native installs do; Homebrew, WinGet and Linux package-manager installs don't by default. Per the setup docs (external), Claude Code "checks for updates on startup and periodically while running," downloads in the background, and the update "take[s] effect the next time you start Claude Code."


Can you choose a slower, steadier update channel?
Yes. The autoUpdatesChannel setting picks between "latest" (the default, new features right away) and "stable" ("typically about one week old, skipping releases with major regressions"). Set it in /config or in settings.json:
{
"autoUpdatesChannel": "stable"
}How do you turn off Claude Code auto-updates?
Set DISABLE_AUTOUPDATER to "1" in the env block of your settings.json:
{
"env": {
"DISABLE_AUTOUPDATER": "1"
}
}Then run claude doctor; the Auto-updates line should read disabled (set by env: DISABLE_AUTOUPDATER). The docs note this "only stops the background check; claude update and claude install still work." To block every update path, the setting is DISABLE_UPDATES.

If you turn auto-updates off, put a reminder on your calendar to run claude update yourself. Staying current is how security fixes reach you (see below).

Why is my Claude Code update failing?
Most failed updates come down to a handful of causes covered in Anthropic's install troubleshooting docs (external). Start with claude doctor, which reports the install method, auto-update status and "Last update attempt."

claude doctor on our test machine after updating, not signed in. The sign-in-only parts were skipped.
| Symptom | Likely cause (per the docs) | What to try |
|---|---|---|
| Version doesn't change after updating | More than one install (native, npm, old local npm) | which -a claude; check ~/.local/bin/claude, ~/.claude/local/ and npm -g ls @anthropic-ai/claude-code; keep one |
| "Auto-update failed · Run claude doctor" in the footer | A background update didn't install | Run claude update in your shell to see the actual error |
| Permission errors on an npm install | npm's global folder isn't writable | Don't use sudo; the docs suggest switching to the native installer |
| "The connection dropped while downloading the update" | A proxy or network cut the download | Run claude update again; set HTTPS_PROXY if you need a proxy |
| "Release verification failed" | Claude Code couldn't confirm the release is genuine, so it installed nothing | Run the same command again later; your current version keeps working |
claude update or claude doctor hangs | A folder where a shell config file should be (fixed in v2.1.214) | Move the folder aside, or rerun the install script |
command not found: claude | The install folder isn't on your PATH | Follow "Fix your PATH" in the docs |
EBADENGINE warning on npm | Node older than 22 | Usually just a warning; upgrade Node when you can |
If none of these match, the docs' troubleshooting page has a "Find your error" index with the exact messages.
Why updating matters for security
Updates are how security fixes reach you. Anthropic's setup docs tell Homebrew and WinGet users to upgrade "to get the latest features and security fixes." The security advisories page (external) for the anthropics/claude-code GitHub repository listed 35 advisories when we checked on Oct 22, 2026, with severity labels such as High, Moderate and Low.

We won't summarize individual advisories here; read each one on GitHub for which versions it affects and what changed. The practical takeaway is simple: a coding agent that can run commands and edit files on your machine is worth keeping current. Pair that with sensible permission and sandbox settings, so an agent can't do more than you meant it to.
After you update: a 2-minute pre-launch check
Updating your tools protects your machine. Before real users arrive, check what you're about to ship, too:
- Keys out of the frontend. API keys for Claude or OpenAI belong on a server, never in browser code. See Claude API key security.
- No
.envor.gitfiles served publicly. Ask your host to block them, then check from a browser. - No public source maps unless you meant to publish your source code.
- Know what you're paying for. If Claude Code is on your plan, our Claude Code pricing guide explains the limits.
- Compare tools if you're choosing one. See Codex vs Claude Code and Cursor vs Claude Code.
- Run a scan of your live app (below).
FAQ
How do I check my Claude Code version?
Run claude --version in your terminal. It prints something like 2.1.308 (Claude Code). In VS Code, the extension's version in the Extensions view is the Claude Code version it bundles.
Does Claude Code update automatically? Native installs do, in the background, and the new version takes effect the next time you start Claude Code. Homebrew, WinGet, apt, dnf and apk installs don't auto-update by default.
Why is my Claude Code update failing?
The most common causes are more than one install on your machine, npm permission errors, a network or proxy cutting the download, or a PATH problem. Run claude doctor, then claude update to see the actual error.
Can I turn off auto-updates?
Yes. Set DISABLE_AUTOUPDATER to "1" in the env block of settings.json. claude update still works when you want to update by hand.
Do I need to update to get security fixes? Yes. Fixes ship in new releases, and Anthropic's docs tell package-manager users to upgrade to get them. The repository's public security advisories page lists what was fixed.
Updated? Scan your app before launch.
Updated your tools and ready to ship what you built? Scan your app before launch with Greenlight My App's free scan to check for exposed keys and files. It's automated, read-only and educational, not a security audit: it checks HTTPS, common security headers, exposed .env or .git files, public source maps and common secret key patterns in the scripts your homepage loads. "Nothing found" isn't a guarantee that nothing is exposed. Run a free scan (external).
Sources
On this site
Related posts

Claude Code pricing: plans, usage costs and real examples
Claude Code pricing as of Oct 21, 2026: which Claude plans include it, what pay-as-you-go use costs, worked examples and a simple cost table.

Claude vs ChatGPT: plans, prices and features compared
Claude vs ChatGPT compared Oct 21, 2026: free and paid plans, prices, models, context, features, coding agents and how to pick the right one for you.

Codex vs Claude Code: pricing, safety settings and how to pick
Codex vs Claude Code compared Oct 21, 2026: plan prices, usage limits, where each runs, sandbox and permission defaults, and how to pick for your app.
Get the next change before it bites
Greenlight tips and new blog posts: short, practical notes when Supabase, Lovable, Bolt, Cursor or another tool you build with changes something that affects your app, plus what to check. About twice a month.
We'll send a confirmation email first. Unsubscribe anytime. Privacy. Greenlight My App is independent and not affiliated with or endorsed by Supabase, Lovable, Bolt, Cursor or any other tool we mention.
Greenlight My App is independent and not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic; npm, Homebrew, WinGet, VS Code and GitHub are trademarks of their owners; not affiliated with Greenlight My App. We tested the install and update commands only, not Claude Code's coding features. This page is general information, not professional security advice, legal advice, a security audit or a guarantee. Check your own setup against the vendor's current docs.