Follow Discord
Sweep 30 Oct 2026 · 01:02Z Build v2.1.314 532 read Stable v2.1.308 Latest v2.1.314 Next v2.1.314 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Troubleshoot installation and login changedtroubleshoot-install

Nearest release: v2.1.314, published 17 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 30 Oct 2026 17:44 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 30 Oct 2026 18:07 UTC.

Upstream edited
Recorded here
Lines+285added
Lines−285removed
From line 71 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits27to this page, all time

The whole hunk

from line 71, old and new numbered
/
lines

The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.

from line 71
7171 
7272The installer downloads from `downloads.claude.ai`. Verify you can reach it:
7373 
74**macOS/Linux**
75 
76```bash theme={null}
77curl -sI https://downloads.claude.ai/claude-code-releases/latest
78```
79 
80**Windows PowerShell**
81 
82```powershell theme={null}
83curl.exe -sI https://downloads.claude.ai/claude-code-releases/latest
84```
85 
86PowerShell aliases `curl` to `Invoke-WebRequest`, which rejects the `-sI` flags, so call `curl.exe` explicitly.
74> [tab] macOS/Linux
75>
76> ```bash theme={null}
77> curl -sI https://downloads.claude.ai/claude-code-releases/latest
78> ```
79 
80> [tab] Windows PowerShell
81>
82> ```powershell theme={null}
83> curl.exe -sI https://downloads.claude.ai/claude-code-releases/latest
84> ```
85>
86> PowerShell aliases `curl` to `Invoke-WebRequest`, which rejects the `-sI` flags, so call `curl.exe` explicitly.
8787 
8888You reached the server if the first line shows a `200` status. You see `HTTP/2 200` on macOS and Linux, and `HTTP/1.1 200 OK` from the `curl.exe` included with Windows. Other results point to the cause:
8989 
from line 100
100100 
101101This example sets both proxy variables, then runs the installer through your proxy:
102102 
103**macOS/Linux**
104 
105```bash theme={null}
106export HTTP_PROXY=http://proxy.example.com:8080
107export HTTPS_PROXY=http://proxy.example.com:8080
108curl -fsSL https://claude.ai/install.sh | bash
109```
110 
111**Windows PowerShell**
112 
113```powershell theme={null}
114$env:HTTP_PROXY = 'http://proxy.example.com:8080'
115$env:HTTPS_PROXY = 'http://proxy.example.com:8080'
116irm https://claude.ai/install.ps1 | iex
117```
103> [tab] macOS/Linux
104>
105> ```bash theme={null}
106> export HTTP_PROXY=http://proxy.example.com:8080
107> export HTTPS_PROXY=http://proxy.example.com:8080
108> curl -fsSL https://claude.ai/install.sh | bash
109> ```
110 
111> [tab] Windows PowerShell
112>
113> ```powershell theme={null}
114> $env:HTTP_PROXY = 'http://proxy.example.com:8080'
115> $env:HTTPS_PROXY = 'http://proxy.example.com:8080'
116> irm https://claude.ai/install.ps1 | iex
117> ```
118118 
119119### Verify your PATH
120120 
from line 128
128128 
129129First check that the program is there at all, then check whether its folder is in your PATH. The PATH fix is permanent, so you apply it once. Pick your platform's tab and run its commands there: in your terminal on macOS and Linux, or in PowerShell or Command Prompt on Windows.
130130 
131**macOS/Linux**
132 
133Check that the installer put the program in place:
134 
135```bash theme={null}
136ls -la ~/.local/bin/claude
137```
138 
139* **`No such file or directory`**: there's no native install. If you haven't installed Claude Code another way, such as with npm, Homebrew, or a Linux package manager, [install Claude Code](https://code.claude.com/docs/en/setup.md#install-claude-code). If you installed it another way, see [Check for conflicting installations](#check-for-conflicting-installations).
140* **A listing for the file**: the program is there. Check your PATH next.
141 
142List your PATH entries and filter for the install folder:
143 
144```bash theme={null}
145echo $PATH | tr ':' '\n' | grep -Fx "$HOME/.local/bin"
146```
147 
148If this prints `/Users/you/.local/bin` or `/home/you/.local/bin`, the directory is in your PATH and you can skip to [Check for conflicting installations](#check-for-conflicting-installations). If there's no output, add it to your shell configuration with the two commands for your shell. The `echo` command saves the setting for every new terminal, and `source` applies it to the window you're in. The `echo` command prints nothing when it succeeds.
149 
150For Zsh, the default on macOS:
151 
152```bash theme={null}
153echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
154source ~/.zshrc
155```
156 
157For Bash on Linux, where it's the default on most distributions:
158 
159```bash theme={null}
160echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
161source ~/.bashrc
162```
163 
164For Bash on macOS, add the line to `~/.bash_profile` instead. Terminal on macOS starts Bash as a login shell, which ignores `~/.bashrc` and reads only the first of `~/.bash_profile`, `~/.bash_login`, or `~/.profile` that exists. If you already have a `~/.bash_login` or `~/.profile` and no `~/.bash_profile`, put the line in that file rather than creating `~/.bash_profile`:
165 
166```bash theme={null}
167echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bash_profile
168source ~/.bash_profile
169```
170 
171Alternatively, close and reopen your terminal.
172 
173If the `echo` command prints `permission denied`, see [`permission denied` when adding to your PATH](#permission-denied-when-adding-to-your-path).
174 
175For other shells such as fish or Nushell, add `~/.local/bin` to your PATH using your shell's own configuration syntax, then restart your terminal.
176 
177Verify the fix worked:
178 
179```bash theme={null}
180claude --version
181```
182 
183If `claude` is still not found, check these causes:
184 
185* **The terminal predates the change**: a window that was already open keeps its old PATH, and a terminal inside an editor takes its PATH from the editor. Open a new window, or quit and reopen the editor.
186* **The line wasn't saved**: run `grep -n '.local/bin' ~/.zshrc`, using your shell's file name. It prints the line with its line number when the line is there. If it prints nothing, run the two PATH commands again.
187* **The line went to another shell's file**: run `echo $0` to see your shell, then run the two PATH commands for that shell.
188 
189**Windows PowerShell**
190 
191Check that the installer put the program in place:
192 
193```powershell theme={null}
194Test-Path "$env:USERPROFILE\.local\bin\claude.exe"
195```
196 
197* **`False`**: there's no native install. If you haven't installed Claude Code another way, such as with npm or WinGet, [install Claude Code](https://code.claude.com/docs/en/setup.md#install-claude-code). If you installed it another way, see [Check for conflicting installations](#check-for-conflicting-installations).
198* **`True`**: the program is there. Check your PATH next.
199 
200List your PATH entries and filter for the install folder:
201 
202```powershell theme={null}
203$env:PATH -split ';' | Select-String '\.local\\bin'
204```
205 
206If this prints `C:\Users\you\.local\bin`, the directory is in your PATH and you can skip to [Check for conflicting installations](#check-for-conflicting-installations). If there's no output, add the install directory to your User PATH:
207 
208```powershell theme={null}
209$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
210[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')
211```
212 
213Restart your terminal for the change to take effect.
214 
215Verify the fix worked:
216 
217```powershell theme={null}
218claude --version
219```
220 
221If `claude` is still not found in a new terminal, check these causes:
222 
223* **The terminal runs inside an editor**: it takes its PATH from the editor, so quit and reopen the editor.
224* **The change wasn't saved**: run `[Environment]::GetEnvironmentVariable('PATH', 'User')` and look for `.local\bin` in the PATH it prints. If it's missing, run the two commands again.
225 
226**Windows CMD**
227 
228Check that the installer put the program in place:
229 
230```batch theme={null}
231dir "%USERPROFILE%\.local\bin\claude.exe"
232```
233 
234* **`File Not Found` or `The system cannot find the path specified.`**: there's no native install. If you haven't installed Claude Code another way, such as with npm or WinGet, [install Claude Code](https://code.claude.com/docs/en/setup.md#install-claude-code). If you installed it another way, see [Check for conflicting installations](#check-for-conflicting-installations).
235* **A listing for `claude.exe`**: the program is there. Check your PATH next.
236 
237List your PATH entries and filter for the install folder:
238 
239```batch theme={null}
240echo %PATH% | findstr /i "local\bin"
241```
242 
243If there's no output, open System Settings, go to Environment Variables, and add `%USERPROFILE%\.local\bin` to your User PATH variable. Restart your terminal.
244 
245Verify the fix worked:
246 
247```batch theme={null}
248claude --version
249```
250 
251If `claude` is still not found in a new terminal, a terminal inside an editor takes its PATH from the editor, so quit and reopen the editor too.
131> [tab] macOS/Linux
132>
133> Check that the installer put the program in place:
134>
135> ```bash theme={null}
136> ls -la ~/.local/bin/claude
137> ```
138>
139> * **`No such file or directory`**: there's no native install. If you haven't installed Claude Code another way, such as with npm, Homebrew, or a Linux package manager, [install Claude Code](https://code.claude.com/docs/en/setup.md#install-claude-code). If you installed it another way, see [Check for conflicting installations](#check-for-conflicting-installations).
140> * **A listing for the file**: the program is there. Check your PATH next.
141>
142> List your PATH entries and filter for the install folder:
143>
144> ```bash theme={null}
145> echo $PATH | tr ':' '\n' | grep -Fx "$HOME/.local/bin"
146> ```
147>
148> If this prints `/Users/you/.local/bin` or `/home/you/.local/bin`, the directory is in your PATH and you can skip to [Check for conflicting installations](#check-for-conflicting-installations). If there's no output, add it to your shell configuration with the two commands for your shell. The `echo` command saves the setting for every new terminal, and `source` applies it to the window you're in. The `echo` command prints nothing when it succeeds.
149>
150> For Zsh, the default on macOS:
151>
152> ```bash theme={null}
153> echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
154> source ~/.zshrc
155> ```
156>
157> For Bash on Linux, where it's the default on most distributions:
158>
159> ```bash theme={null}
160> echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
161> source ~/.bashrc
162> ```
163>
164> For Bash on macOS, add the line to `~/.bash_profile` instead. Terminal on macOS starts Bash as a login shell, which ignores `~/.bashrc` and reads only the first of `~/.bash_profile`, `~/.bash_login`, or `~/.profile` that exists. If you already have a `~/.bash_login` or `~/.profile` and no `~/.bash_profile`, put the line in that file rather than creating `~/.bash_profile`:
165>
166> ```bash theme={null}
167> echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bash_profile
168> source ~/.bash_profile
169> ```
170>
171> Alternatively, close and reopen your terminal.
172>
173> If the `echo` command prints `permission denied`, see [`permission denied` when adding to your PATH](#permission-denied-when-adding-to-your-path).
174>
175> For other shells such as fish or Nushell, add `~/.local/bin` to your PATH using your shell's own configuration syntax, then restart your terminal.
176>
177> Verify the fix worked:
178>
179> ```bash theme={null}
180> claude --version
181> ```
182>
183> If `claude` is still not found, check these causes:
184>
185> * **The terminal predates the change**: a window that was already open keeps its old PATH, and a terminal inside an editor takes its PATH from the editor. Open a new window, or quit and reopen the editor.
186> * **The line wasn't saved**: run `grep -n '.local/bin' ~/.zshrc`, using your shell's file name. It prints the line with its line number when the line is there. If it prints nothing, run the two PATH commands again.
187> * **The line went to another shell's file**: run `echo $0` to see your shell, then run the two PATH commands for that shell.
188 
189> [tab] Windows PowerShell
190>
191> Check that the installer put the program in place:
192>
193> ```powershell theme={null}
194> Test-Path "$env:USERPROFILE\.local\bin\claude.exe"
195> ```
196>
197> * **`False`**: there's no native install. If you haven't installed Claude Code another way, such as with npm or WinGet, [install Claude Code](https://code.claude.com/docs/en/setup.md#install-claude-code). If you installed it another way, see [Check for conflicting installations](#check-for-conflicting-installations).
198> * **`True`**: the program is there. Check your PATH next.
199>
200> List your PATH entries and filter for the install folder:
201>
202> ```powershell theme={null}
203> $env:PATH -split ';' | Select-String '\.local\\bin'
204> ```
205>
206> If this prints `C:\Users\you\.local\bin`, the directory is in your PATH and you can skip to [Check for conflicting installations](#check-for-conflicting-installations). If there's no output, add the install directory to your User PATH:
207>
208> ```powershell theme={null}
209> $currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
210> [Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')
211> ```
212>
213> Restart your terminal for the change to take effect.
214>
215> Verify the fix worked:
216>
217> ```powershell theme={null}
218> claude --version
219> ```
220>
221> If `claude` is still not found in a new terminal, check these causes:
222>
223> * **The terminal runs inside an editor**: it takes its PATH from the editor, so quit and reopen the editor.
224> * **The change wasn't saved**: run `[Environment]::GetEnvironmentVariable('PATH', 'User')` and look for `.local\bin` in the PATH it prints. If it's missing, run the two commands again.
225 
226> [tab] Windows CMD
227>
228> Check that the installer put the program in place:
229>
230> ```batch theme={null}
231> dir "%USERPROFILE%\.local\bin\claude.exe"
232> ```
233>
234> * **`File Not Found` or `The system cannot find the path specified.`**: there's no native install. If you haven't installed Claude Code another way, such as with npm or WinGet, [install Claude Code](https://code.claude.com/docs/en/setup.md#install-claude-code). If you installed it another way, see [Check for conflicting installations](#check-for-conflicting-installations).
235> * **A listing for `claude.exe`**: the program is there. Check your PATH next.
236>
237> List your PATH entries and filter for the install folder:
238>
239> ```batch theme={null}
240> echo %PATH% | findstr /i "local\bin"
241> ```
242>
243> If there's no output, open System Settings, go to Environment Variables, and add `%USERPROFILE%\.local\bin` to your User PATH variable. Restart your terminal.
244>
245> Verify the fix worked:
246>
247> ```batch theme={null}
248> claude --version
249> ```
250>
251> If `claude` is still not found in a new terminal, a terminal inside an editor takes its PATH from the editor, so quit and reopen the editor too.
252252 
253253### Check for conflicting installations
254254 
255255Multiple Claude Code installations can cause version mismatches or unexpected behavior. Check what's installed:
256256 
257**macOS/Linux**
258 
259List all `claude` binaries found in your PATH:
260 
261```bash theme={null}
262which -a claude
263```
264 
265If this prints `claude not found`, a `no claude in` line, or nothing, no `claude` is on your PATH. The next checks show whether one is installed at all.
266 
267Check the three locations a `claude` binary can come from. `~/.local/bin/claude` is the native installer, `~/.claude/local/` is a legacy local npm install created by older versions of Claude Code, and the npm global list shows a `-g` install:
268 
269```bash theme={null}
270ls -la ~/.local/bin/claude
271```
272 
273A native install shows a symlink into `~/.local/share/claude/versions/`. A script or a symlink you created yourself at this path is a custom launcher, which [auto-update leaves in place](https://code.claude.com/docs/en/setup.md#auto-updates).
274 
275If either `ls` command prints `No such file or directory`, that's not an error. It means nothing is installed at that location, so move on to the next check.
276 
277```bash theme={null}
278ls -la ~/.claude/local/
279```
280 
281```bash theme={null}
282npm -g ls @anthropic-ai/claude-code 2>/dev/null
283```
284 
285If `ls -la ~/.local/bin/claude` printed `No such file or directory`, there's no native install. If you haven't installed Claude Code another way, such as with npm, Homebrew, or a Linux package manager, [install Claude Code](https://code.claude.com/docs/en/setup.md#install-claude-code). If `~/.local/bin/claude` exists but `which -a claude` didn't list it, the folder isn't in your PATH: see [Verify your PATH](#verify-your-path).
286 
287**Windows PowerShell**
288 
289List all `claude` binaries found in your PATH:
290 
291```powershell theme={null}
292where.exe claude
293```
294 
295If this prints `INFO: Could not find files for the given pattern(s).`, no `claude` is on your PATH.
296 
297Check whether the native installer placed a binary:
298 
299```powershell theme={null}
300Test-Path "$env:USERPROFILE\.local\bin\claude.exe"
301```
302 
303* **`True`**: the native install is there. If `where.exe` found nothing, its folder isn't in your PATH: see [Verify your PATH](#verify-your-path).
304* **`False`**: there's no native install. If you haven't installed Claude Code another way, such as with npm or WinGet, [install Claude Code](https://code.claude.com/docs/en/setup.md#install-claude-code).
257> [tab] macOS/Linux
258>
259> List all `claude` binaries found in your PATH:
260>
261> ```bash theme={null}
262> which -a claude
263> ```
264>
265> If this prints `claude not found`, a `no claude in` line, or nothing, no `claude` is on your PATH. The next checks show whether one is installed at all.
266>
267> Check the three locations a `claude` binary can come from. `~/.local/bin/claude` is the native installer, `~/.claude/local/` is a legacy local npm install created by older versions of Claude Code, and the npm global list shows a `-g` install:
268>
269> ```bash theme={null}
270> ls -la ~/.local/bin/claude
271> ```
272>
273> A native install shows a symlink into `~/.local/share/claude/versions/`. A script or a symlink you created yourself at this path is a custom launcher, which [auto-update leaves in place](https://code.claude.com/docs/en/setup.md#auto-updates).
274>
275> If either `ls` command prints `No such file or directory`, that's not an error. It means nothing is installed at that location, so move on to the next check.
276>
277> ```bash theme={null}
278> ls -la ~/.claude/local/
279> ```
280>
281> ```bash theme={null}
282> npm -g ls @anthropic-ai/claude-code 2>/dev/null
283> ```
284>
285> If `ls -la ~/.local/bin/claude` printed `No such file or directory`, there's no native install. If you haven't installed Claude Code another way, such as with npm, Homebrew, or a Linux package manager, [install Claude Code](https://code.claude.com/docs/en/setup.md#install-claude-code). If `~/.local/bin/claude` exists but `which -a claude` didn't list it, the folder isn't in your PATH: see [Verify your PATH](#verify-your-path).
286 
287> [tab] Windows PowerShell
288>
289> List all `claude` binaries found in your PATH:
290>
291> ```powershell theme={null}
292> where.exe claude
293> ```
294>
295> If this prints `INFO: Could not find files for the given pattern(s).`, no `claude` is on your PATH.
296>
297> Check whether the native installer placed a binary:
298>
299> ```powershell theme={null}
300> Test-Path "$env:USERPROFILE\.local\bin\claude.exe"
301> ```
302>
303> * **`True`**: the native install is there. If `where.exe` found nothing, its folder isn't in your PATH: see [Verify your PATH](#verify-your-path).
304> * **`False`**: there's no native install. If you haven't installed Claude Code another way, such as with npm or WinGet, [install Claude Code](https://code.claude.com/docs/en/setup.md#install-claude-code).
305305 
306306If you find multiple installations, keep only one. The native install at `~/.local/bin/claude` on macOS/Linux or `%USERPROFILE%\.local\bin\claude.exe` on Windows is recommended. Remove the extras:
307307 
from line 313
313313 
314314Remove the legacy local npm install:
315315 
316**macOS/Linux**
317 
318```bash theme={null}
319rm -rf ~/.claude/local
320```
321 
322**Windows PowerShell**
323 
324```powershell theme={null}
325Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\local"
326```
316> [tab] macOS/Linux
317>
318> ```bash theme={null}
319> rm -rf ~/.claude/local
320> ```
321 
322> [tab] Windows PowerShell
323>
324> ```powershell theme={null}
325> Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\local"
326> ```
327327 
328328Remove a Homebrew install on macOS. If you installed the `claude-code@latest` cask, substitute that name:
329329 
from line 372
372372 
373373Confirm the binary exists and is executable:
374374 
375**macOS/Linux**
376 
377```bash theme={null}
378ls -la "$(command -v claude)"
379```
380 
381**Windows PowerShell**
382 
383```powershell theme={null}
384Get-Command claude | Select-Object Source
385```
375> [tab] macOS/Linux
376>
377> ```bash theme={null}
378> ls -la "$(command -v claude)"
379> ```
380 
381> [tab] Windows PowerShell
382>
383> ```powershell theme={null}
384> Get-Command claude | Select-Object Source
385> ```
386386 
387387On Linux, check for missing shared libraries. If `ldd` shows missing libraries, you may need to install system packages. On Alpine Linux and other musl-based distributions, see [Alpine Linux setup](https://code.claude.com/docs/en/setup.md#alpine-linux-and-musl-based-distributions).
388388 
from line 564
564564 
5655653. **Check for proxy or firewall interference**: corporate proxies that perform TLS inspection can cause these errors, including `unable to get local issuer certificate` and `SELF_SIGNED_CERT_IN_CHAIN`. For the install step, make the install download trust your corporate proxy's CA:
566566 
567 **macOS/Linux**
568 
569 ```bash theme={null}
570 curl --cacert /path/to/corporate-ca.pem -fsSL https://claude.ai/install.sh | bash
571 ```
572 
573 **Windows PowerShell**
574 
575 The PowerShell installer downloads through .NET, which validates TLS against the Windows certificate store. Ask your IT team to add the proxy's CA certificate to the Windows store if it isn't already there, then run the installer:
576 
577 ```powershell theme={null}
578 irm https://claude.ai/install.ps1 | iex
579 ```
567 > [tab] macOS/Linux
568 >
569 > ```bash theme={null}
570 > curl --cacert /path/to/corporate-ca.pem -fsSL https://claude.ai/install.sh | bash
571 > ```
572 
573 > [tab] Windows PowerShell
574 >
575 > The PowerShell installer downloads through .NET, which validates TLS against the Windows certificate store. Ask your IT team to add the proxy's CA certificate to the Windows store if it isn't already there, then run the installer:
576 >
577 > ```powershell theme={null}
578 > irm https://claude.ai/install.ps1 | iex
579 > ```
580580 
581581 For Claude Code itself once installed, set `NODE_EXTRA_CA_CERTS` so API requests trust the same bundle:
582582 
583 **macOS/Linux**
584 
585 ```bash theme={null}
586 export NODE_EXTRA_CA_CERTS=/path/to/corporate-ca.pem
587 ```
588 
589 **Windows PowerShell**
590 
591 ```powershell theme={null}
592 $env:NODE_EXTRA_CA_CERTS = 'C:\path\to\corporate-ca.pem'
593 ```
583 > [tab] macOS/Linux
584 >
585 > ```bash theme={null}
586 > export NODE_EXTRA_CA_CERTS=/path/to/corporate-ca.pem
587 > ```
588 
589 > [tab] Windows PowerShell
590 >
591 > ```powershell theme={null}
592 > $env:NODE_EXTRA_CA_CERTS = 'C:\path\to\corporate-ca.pem'
593 > ```
594594 
595595 Ask your IT team for the certificate file if you don't have it. You can also try on a direct connection to confirm the proxy is the cause.
596596 
from line 823
823823 
824824In every other configuration, rerunning the installer gets past this error, because the script runs the latest release's `install` command even when you ask it to install an older version. Rerun the command for your platform:
825825 
826**macOS/Linux**
827 
828```bash theme={null}
829curl -fsSL https://claude.ai/install.sh | bash
830```
831 
832**Windows PowerShell**
833 
834```powershell theme={null}
835irm https://claude.ai/install.ps1 | iex
836```
826> [tab] macOS/Linux
827>
828> ```bash theme={null}
829> curl -fsSL https://claude.ai/install.sh | bash
830> ```
831 
832> [tab] Windows PowerShell
833>
834> ```powershell theme={null}
835> irm https://claude.ai/install.ps1 | iex
836> ```
837837 
838838`claude --version` prints the version the rerun installed.
839839 
from line 1104
11041104 
11051105The `npm error path` line names the directory npm couldn't move. Delete that directory and any leftover `.claude-code-*` directories next to it, which earlier interrupted runs can leave behind. The commands below find your global package directory with `npm root -g`; if the directory the `npm error path` line names is not under the directory `npm root -g` prints, for example because you switched Node versions with nvm, delete the directories the error names instead:
11061106 
1107**macOS/Linux**
1108 
1109```bash theme={null}
1110rm -rf "$(npm root -g)/@anthropic-ai/claude-code"
1111```
1112 
1113Then remove any leftover temp directories. If Zsh prints `no matches found`, there were none to remove:
1114 
1115```bash theme={null}
1116rm -rf "$(npm root -g)/@anthropic-ai/.claude-code-"*
1117```
1118 
1119**Windows PowerShell**
1120 
1121```powershell theme={null}
1122Remove-Item -Recurse -Force "$(npm root -g)/@anthropic-ai/claude-code", "$(npm root -g)/@anthropic-ai/.claude-code-*"
1123```
1107> [tab] macOS/Linux
1108>
1109> ```bash theme={null}
1110> rm -rf "$(npm root -g)/@anthropic-ai/claude-code"
1111> ```
1112>
1113> Then remove any leftover temp directories. If Zsh prints `no matches found`, there were none to remove:
1114>
1115> ```bash theme={null}
1116> rm -rf "$(npm root -g)/@anthropic-ai/.claude-code-"*
1117> ```
1118 
1119> [tab] Windows PowerShell
1120>
1121> ```powershell theme={null}
1122> Remove-Item -Recurse -Force "$(npm root -g)/@anthropic-ai/claude-code", "$(npm root -g)/@anthropic-ai/.claude-code-*"
1123> ```
11241124 
11251125Then reinstall. On npm 12, follow [Fix an npm 12 install](#fix-an-npm-12-install). Otherwise, run:
11261126 
from line 1158
11581158 
11591159If you see `API Error: 403 Request not allowed` after logging in:
11601160 
1161* **Claude Pro/Max users**: verify your subscription is active at [claude.ai/settings](https://claude.ai/settings)
1161* **Claude Pro/Max/Ultra users**: verify your subscription is active at [claude.ai/settings](https://claude.ai/settings)
11621162* **Anthropic Console users**: confirm your account has the "Claude Code" or "Developer" role. Admins assign this on the Console's Members page at [platform.claude.com/settings/members](https://platform.claude.com/settings/members).
11631163* **Behind a proxy**: corporate proxies can interfere with API requests. See [network configuration](https://code.claude.com/docs/en/network-config.md) for proxy setup.
11641164 
from line 1179
11791179 
11801180To use your subscription instead, unset the environment variable and remove it from your shell profile:
11811181 
1182**macOS/Linux**
1183 
1184```bash theme={null}
1185unset ANTHROPIC_API_KEY
1186claude
1187```
1188 
1189**Windows PowerShell**
1190 
1191```powershell theme={null}
1192Remove-Item Env:ANTHROPIC_API_KEY
1193claude
1194```
1182> [tab] macOS/Linux
1183>
1184> ```bash theme={null}
1185> unset ANTHROPIC_API_KEY
1186> claude
1187> ```
1188 
1189> [tab] Windows PowerShell
1190>
1191> ```powershell theme={null}
1192> Remove-Item Env:ANTHROPIC_API_KEY
1193> claude
1194> ```
11951195 
11961196Check `~/.zshrc`, `~/.bashrc`, or `~/.profile` for `export ANTHROPIC_API_KEY=...` lines and remove them to make the change permanent. On Windows, check your PowerShell profile at `$PROFILE` and your User environment variables for `ANTHROPIC_API_KEY`. Run `/status` inside Claude Code to confirm which authentication method is active.
11971197 
11981198 
Feedback