{"id":433,"date":"2026-07-08T05:32:12","date_gmt":"2026-07-08T05:32:12","guid":{"rendered":"https:\/\/abrarqasim.com\/blog\/how-to-uninstall-claude-code\/"},"modified":"2026-07-08T05:32:12","modified_gmt":"2026-07-08T05:32:12","slug":"how-to-uninstall-claude-code","status":"publish","type":"post","link":"https:\/\/abrarqasim.com\/blog\/how-to-uninstall-claude-code\/","title":{"rendered":"How to Uninstall Claude Code: The Clean Removal I Actually Run"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>Last updated: July 2026. Reflects the native-installer era (Claude Code 2.1.x) and the npm path Anthropic now treats as legacy.<\/em><\/p>\n\n\n\n<div class=\"wp-block-group tldr-box has-pale-cyan-blue-background-color has-background\" style=\"border-width:1px;border-radius:8px;padding-top:1.5em;padding-right:1.5em;padding-bottom:1.5em;padding-left:1.5em\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<h3 class=\"wp-block-heading has-medium-font-size\">TL;DR<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">First figure out how you installed Claude Code, because the uninstall command depends on it. Native installer: <code>rm -f ~\/.local\/bin\/claude &amp;&amp; rm -rf ~\/.local\/share\/claude<\/code>. Homebrew: <code>brew uninstall --cask claude-code<\/code>. WinGet: <code>winget uninstall Anthropic.ClaudeCode<\/code>. npm: <code>npm uninstall -g @anthropic-ai\/claude-code<\/code>. None of those touch your config. To wipe settings, MCP servers, auth tokens and session history, also delete <code>~\/.claude<\/code>, <code>~\/.claude.json<\/code>, and any project-local <code>.claude\/<\/code> and <code>.mcp.json<\/code>. If <code>claude<\/code> still runs after all that, you have a second install or an old shell alias.<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Why the uninstall is harder than it should be<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Claude Code is not one thing you delete. It is a binary, a config directory, a JSON file at your home root, a per-project <code>.claude<\/code> folder, an MCP file, maybe a VS Code extension, maybe a JetBrains plugin, and maybe the Claude Desktop app, all writing into the same <code>~\/.claude<\/code>. The docs describe a clean removal in ninety seconds. My reality was that I ran <code>npm uninstall -g @anthropic-ai\/claude-code<\/code>, typed <code>claude<\/code>, and the CLI still launched. A shell alias from an old install script. Twenty minutes I did not budget.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The other trap is the January 2026 migration. Anthropic moved from npm to a standalone native installer around v2.1.15. If you first installed Claude Code before that, you probably ran <code>npm install -g<\/code>. If you followed the &#8220;migrate&#8221; instructions, you now have the native binary at <code>~\/.local\/bin\/claude<\/code> and the old npm shim somewhere in your <code>PATH<\/code>. Uninstalling one and leaving the other is the single most common way people end up with a &#8220;how is this still running?&#8221; problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This post is the checklist I run on my own machines. Nothing here is a trick. It is just the boring surface area you have to sweep.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: figure out how you installed it<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before you delete anything, ask the shell where it thinks <code>claude<\/code> lives. On macOS, Linux, or WSL:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">which claude\n# common answers:\n# \/Users\/you\/.local\/bin\/claude          -> native installer\n# \/opt\/homebrew\/bin\/claude              -> Homebrew (Apple silicon)\n# \/usr\/local\/bin\/claude                 -> Homebrew (Intel) or apt\/dnf\n# \/Users\/you\/.nvm\/versions\/node\/...\/bin\/claude   -> npm global\n# \/usr\/local\/bin\/claude (symlink)       -> npm via system Node<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On Windows PowerShell:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">where.exe claude<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you see more than one path, that is your answer for why the last uninstall attempt did not stick. Handle each install separately, in the sections below.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also ask Claude Code itself. Run <code>claude doctor<\/code>. It tells you the install method it detected, the version, the update channel, and whether the config directory is writable. That output is the fastest way to figure out what you are actually dealing with, and I run it before I touch anything.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Native installer: the one Anthropic recommends<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you installed with <code>curl -fsSL https:\/\/claude.ai\/install.sh | bash<\/code>, or the equivalent PowerShell one-liner, you have the native binary. It lives at <code>~\/.local\/bin\/claude<\/code> with the version files under <code>~\/.local\/share\/claude<\/code>. There is no package manager tracking it, so you delete both by hand.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">macOS, Linux, WSL:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">rm -f ~\/.local\/bin\/claude\nrm -rf ~\/.local\/share\/claude<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Windows PowerShell:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Remove-Item -Path \"$env:USERPROFILE\\.local\\bin\\claude.exe\" -Force\nRemove-Item -Path \"$env:USERPROFILE\\.local\\share\\claude\" -Recurse -Force<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Older versions of the native installer shipped a <code>claude uninstall<\/code> subcommand. If you can still run <code>claude --version<\/code>, try it first. On a current build it just calls the same rm commands, but on older builds it also handled a few edge cases around PATH shims that the manual delete does not. Both paths get you to the same end state.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Homebrew, WinGet, and Linux package managers<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you used a package manager, use the package manager to remove it. Do not <code>rm<\/code> a Homebrew-installed binary out from under Brew, or you will confuse <code>brew doctor<\/code> forever.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Homebrew has two casks. If you installed the stable channel:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">brew uninstall --cask claude-code\nbrew cleanup<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you installed the &#8220;latest&#8221; channel:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">brew uninstall --cask claude-code@latest\nbrew cleanup<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>brew cleanup<\/code> line is not cosmetic. Brew keeps old versions around by default. Skip it and you will have Claude Code artifacts on disk long after you thought you removed them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">WinGet:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">winget uninstall Anthropic.ClaudeCode<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">apt (Debian, Ubuntu):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt remove claude-code\nsudo rm \/etc\/apt\/sources.list.d\/claude-code.list \/etc\/apt\/keyrings\/claude-code.asc<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">dnf (Fedora, RHEL):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dnf remove claude-code\nsudo rm \/etc\/yum.repos.d\/claude-code.repo<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">apk (Alpine):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apk del claude-code\nsed -i '\\|downloads.claude.ai\/claude-code\/apk|d' \/etc\/apk\/repositories\nrm \/etc\/apk\/keys\/claude-code.rsa.pub<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Removing the repository lines matters. Leave them behind, and your next system update will happily pull Claude Code back in as a &#8220;security update&#8221; if you ever reinstall by name. Ask me how I know.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">npm: the legacy path most people are still on<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you installed before the native installer shipped, or you followed a stale tutorial, you have the npm global package. This is now the legacy path, but it is the one I see most often on other people&#8217;s machines.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">npm uninstall -g @anthropic-ai\/claude-code<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Two things to check afterward. First, run <code>which claude<\/code> again. If npm was managed by nvm and you have multiple Node versions installed, the package might only be gone from the currently active Node. Switch versions (<code>nvm use 20<\/code>, <code>nvm use 22<\/code>) and re-run the uninstall for each one. This is the most common cause of &#8220;I removed it but the command still works.&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Second, look at your shell rc file for a shell alias. Some early install scripts, and a few community wrappers, added a line like <code>alias claude=\"npx @anthropic-ai\/claude-code\"<\/code> to <code>~\/.zshrc<\/code> or <code>~\/.bashrc<\/code>. That line survives the npm uninstall and will happily re-download Claude Code the next time you type <code>claude<\/code>. Grep for it:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">grep -rn \"claude\" ~\/.zshrc ~\/.bashrc ~\/.bash_profile ~\/.profile 2&gt;\/dev\/null<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Delete anything that references Claude Code, source the file again, and open a new shell.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Config files: the part everyone skips<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">None of the uninstall commands above touch your configuration. That is deliberate. If you plan to reinstall, you probably want to keep your MCP servers, your allowed-tools list, and your custom slash commands. If you are done with Claude Code, or you are troubleshooting a corrupted config by starting from zero, you have to delete these by hand.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The user-level config on macOS, Linux, WSL:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">rm -rf ~\/.claude\nrm -f ~\/.claude.json<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On Windows PowerShell:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Remove-Item -Path \"$env:USERPROFILE\\.claude\" -Recurse -Force\nRemove-Item -Path \"$env:USERPROFILE\\.claude.json\" -Force<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Project-level state lives inside each repo you used Claude Code in. From the project root:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">rm -rf .claude\nrm -f .mcp.json<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">What you are deleting, in order of &#8220;you probably do not want to lose this without a backup&#8221;: your OAuth session and any Anthropic auth tokens, your local settings including allowed tools and permissions, your MCP server configurations, your custom slash commands, session transcripts, and every <a href=\"https:\/\/abrarqasim.com\/blog\/context-engineering-vs-prompt-engineering-why-my-agents-failed\/\">CLAUDE.md context file<\/a> Claude Code has been reading. If any of that matters, copy <code>~\/.claude<\/code> to a tarball first.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One trap. The VS Code extension, the JetBrains plugin, and the Claude Desktop app all write into the same <code>~\/.claude<\/code> directory. If you delete <code>~\/.claude<\/code> and any of those three is still installed, the directory rematerialises the next time you open them. If your goal is a truly clean state, remove the IDE plugins and the desktop app before you nuke the config.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The IDE and desktop surfaces you probably forgot<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Claude Code is not just the CLI. Every install method leaves side installs you might not remember.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>VS Code extension.<\/strong> If you ever ran Claude Code inside VS Code, or accepted the &#8220;install the Claude Code extension?&#8221; prompt, there is an extension. Remove it from the Extensions view (search &#8220;Claude Code&#8221;, click uninstall) or via the CLI: <code>code --uninstall-extension anthropic.claude-code<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>JetBrains plugin.<\/strong> Settings &rarr; Plugins &rarr; Installed. Search &#8220;Claude Code,&#8221; uninstall, restart the IDE. If you run JetBrains toolbox, it may cache the plugin per project; toolbox settings hold the state.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Claude Desktop app.<\/strong> macOS: drag <code>Claude.app<\/code> from <code>\/Applications<\/code> to the Trash, then <code>rm -rf ~\/Library\/Application\\ Support\/Claude<\/code> and <code>rm -rf ~\/Library\/Caches\/Claude<\/code>. Windows: Settings &rarr; Apps &rarr; Installed apps &rarr; Claude &rarr; Uninstall. Linux: your package manager if you installed via one, otherwise remove the AppImage or the extracted binary.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">None of these are strictly Claude Code, but they all write to <code>~\/.claude<\/code> and any of them will keep the config directory alive if you forget. The full &#8220;is it really gone&#8221; check has to include them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">One command per method: the reference table<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Install method<\/th><th>Uninstall command<\/th><th>Config still there?<\/th><\/tr><\/thead><tbody><tr><td>Native installer (macOS\/Linux\/WSL)<\/td><td><code>rm -f ~\/.local\/bin\/claude &amp;&amp; rm -rf ~\/.local\/share\/claude<\/code><\/td><td>Yes<\/td><\/tr><tr><td>Native installer (Windows)<\/td><td><code>Remove-Item \"$env:USERPROFILE\\.local\\bin\\claude.exe\"; Remove-Item \"$env:USERPROFILE\\.local\\share\\claude\" -Recurse<\/code><\/td><td>Yes<\/td><\/tr><tr><td>Homebrew (stable)<\/td><td><code>brew uninstall --cask claude-code &amp;&amp; brew cleanup<\/code><\/td><td>Yes<\/td><\/tr><tr><td>Homebrew (latest)<\/td><td><code>brew uninstall --cask claude-code@latest &amp;&amp; brew cleanup<\/code><\/td><td>Yes<\/td><\/tr><tr><td>WinGet<\/td><td><code>winget uninstall Anthropic.ClaudeCode<\/code><\/td><td>Yes<\/td><\/tr><tr><td>apt<\/td><td><code>sudo apt remove claude-code<\/code> (then remove repo list + key)<\/td><td>Yes<\/td><\/tr><tr><td>dnf<\/td><td><code>sudo dnf remove claude-code<\/code> (then remove <code>.repo<\/code> file)<\/td><td>Yes<\/td><\/tr><tr><td>apk<\/td><td><code>apk del claude-code<\/code> (then remove repo line + key)<\/td><td>Yes<\/td><\/tr><tr><td>npm (legacy)<\/td><td><code>npm uninstall -g @anthropic-ai\/claude-code<\/code> (per Node version)<\/td><td>Yes<\/td><\/tr><tr><td>Config wipe (all methods)<\/td><td><code>rm -rf ~\/.claude ~\/.claude.json; rm -rf .\/.claude .\/.mcp.json<\/code><\/td><td>No<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Print this, tape it to your monitor, and never re-derive it from a Stack Overflow answer that was written in the npm era.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Verify it is actually gone<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The verification is not a formality. Open a new terminal, then run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">claude --version\n# expected: command not found (or equivalent)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you still get a version number, do these three things in order. First, <code>which claude<\/code> and <code>where.exe claude<\/code> to find the surviving binary; delete it. Second, <code>grep -rn \"claude\" ~\/.zshrc ~\/.bashrc ~\/.bash_profile ~\/.profile ~\/.config\/fish\/config.fish 2&gt;\/dev\/null<\/code> to catch aliases and PATH additions. Third, if you use nvm or asdf or fnm, iterate through every Node version and re-run <code>npm uninstall -g @anthropic-ai\/claude-code<\/code> for each. That covers the three ways I have seen a &#8220;phantom&#8221; Claude Code survive an uninstall.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then check the config directory really is gone:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ls -la ~\/.claude ~\/.claude.json 2&gt;\/dev\/null\n# expected: nothing<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If <code>~\/.claude<\/code> keeps coming back, the culprit is almost always the VS Code extension, the JetBrains plugin, or the Claude Desktop app respawning it. Kill those, delete the folder again, and it stays dead.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">When you should not uninstall<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Half the time someone tells me they uninstalled Claude Code, they did not need to. If your goal is to fix an authentication problem, run <code>claude logout<\/code> then <code>claude<\/code> to re-auth. If your goal is to reset a broken config, delete <code>~\/.claude.json<\/code> alone and leave <code>~\/.claude<\/code> in place. If your goal is to switch models, use <code>\/model<\/code> inside a session, or the <code>autoUpdatesChannel<\/code> and <code>minimumVersion<\/code> settings for version pinning. None of that requires a full removal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Uninstall makes sense in three specific cases. You are moving off Claude Code entirely, probably to <a href=\"https:\/\/abrarqasim.com\/blog\/codex-vs-claude-code-2026\/\">Codex CLI or a different agent<\/a>. You are on a corporate machine and the security team told you to remove it. Or you are debugging something so deeply that a clean reinstall is faster than diagnosing the failure. Anything else, and the config wipe alone is enough.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are removing Claude Code because you found it noisy in your editor or in your git history, that is a workflow problem, not a Claude Code problem. Fix the workflow first. My own guardrails post covers the <a href=\"https:\/\/abrarqasim.com\/blog\/claude-code-hooks-the-guardrails-i-actually-ship\/\">PreToolUse hooks I run to stop the agent from writing to sensitive files<\/a>, which is the fix most people actually need. And if you are trying to decide between Claude Code and its competitors before you commit either way, the honest comparisons are in <a href=\"https:\/\/abrarqasim.com\/blog\/cursor-vs-copilot-vs-claude-code-2026-what-i-reach-for\/\">Cursor vs Copilot vs Claude Code<\/a> and <a href=\"https:\/\/abrarqasim.com\/blog\/is-copilot-safe-what-i-found-auditing-ai-written-code\/\">the Copilot audit<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently asked questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Does <code>npm uninstall -g @anthropic-ai\/claude-code<\/code> remove my Claude Code config?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. The npm uninstall only removes the package binary. Your <code>~\/.claude<\/code> directory, <code>~\/.claude.json<\/code> file, any project-local <code>.claude\/<\/code> folders, and <code>.mcp.json<\/code> files are untouched. If you want them gone, delete them by hand. That separation is intentional, so a reinstall or a temporary removal does not blow away your MCP servers and session history.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Why does <code>claude<\/code> still run after I uninstalled?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Three usual causes. You have a second install through a different method, for example npm and native side by side. You have a shell alias in your <code>~\/.zshrc<\/code> or <code>~\/.bashrc<\/code> from an old install script. Or you use nvm or asdf and only removed the package from the currently active Node version. Run <code>which claude<\/code> (or <code>where.exe claude<\/code>) and <code>grep -rn \"claude\" ~\/.zshrc ~\/.bashrc<\/code> to find the culprit.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Is there a single &#8220;<code>claude uninstall<\/code>&#8221; command?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Older native installer builds shipped a <code>claude uninstall<\/code> subcommand that removed the binary and version files. The current documented path is the pair of <code>rm<\/code> commands for <code>~\/.local\/bin\/claude<\/code> and <code>~\/.local\/share\/claude<\/code>. If <code>claude uninstall<\/code> works on your version, use it. It does not remove config either way.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I uninstall Claude Code on Windows?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you installed with WinGet, run <code>winget uninstall Anthropic.ClaudeCode<\/code>. If you used the PowerShell native installer, remove <code>$env:USERPROFILE\\.local\\bin\\claude.exe<\/code> and the <code>$env:USERPROFILE\\.local\\share\\claude<\/code> directory. To wipe config, also delete <code>$env:USERPROFILE\\.claude<\/code> and <code>$env:USERPROFILE\\.claude.json<\/code>. The Claude Desktop app is separate: uninstall it from Settings &rarr; Apps.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I uninstall Claude Code on macOS?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Depends on how you installed. Homebrew: <code>brew uninstall --cask claude-code<\/code> (or <code>claude-code@latest<\/code>). Native installer: <code>rm -f ~\/.local\/bin\/claude &amp;&amp; rm -rf ~\/.local\/share\/claude<\/code>. npm: <code>npm uninstall -g @anthropic-ai\/claude-code<\/code>. For a full removal, also run <code>rm -rf ~\/.claude ~\/.claude.json<\/code> and drag <code>Claude.app<\/code> to the Trash if you had the desktop app.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Will uninstalling Claude Code cancel my Anthropic subscription?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. Your Claude Pro, Max, Team, or Enterprise plan is a billing relationship with Anthropic, tied to your account. Deleting the CLI on your machine does nothing to it. To cancel, sign in at claude.ai and change your plan there. This is worth checking before you uninstall in a rage, because the two are unrelated.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Should I back up <code>~\/.claude<\/code> before deleting it?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes if you have configured any MCP servers, written custom slash commands, or built up a set of allowed tools you would rather not re-approve. <code>tar -czf claude-backup-$(date +%Y%m%d).tgz ~\/.claude ~\/.claude.json<\/code> is thirty seconds of insurance. On a clean reinstall you can restore the tarball and skip most of the setup.<\/p>\n\n\n\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Does npm uninstall -g @anthropic-ai\/claude-code remove my Claude Code config?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"No. The npm uninstall only removes the package binary. Your ~\/.claude directory, ~\/.claude.json file, any project-local .claude\/ folders, and .mcp.json files are untouched. If you want them gone, delete them by hand. That separation is intentional, so a reinstall or a temporary removal does not blow away your MCP servers and session history.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Why does claude still run after I uninstalled?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Three usual causes. You have a second install through a different method, for example npm and native side by side. You have a shell alias in your ~\/.zshrc or ~\/.bashrc from an old install script. Or you use nvm or asdf and only removed the package from the currently active Node version. Run which claude (or where.exe claude) and grep -rn \\\"claude\\\" ~\/.zshrc ~\/.bashrc to find the culprit.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Is there a single claude uninstall command?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Older native installer builds shipped a claude uninstall subcommand that removed the binary and version files. The current documented path is the pair of rm commands for ~\/.local\/bin\/claude and ~\/.local\/share\/claude. If claude uninstall works on your version, use it. It does not remove config either way.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"How do I uninstall Claude Code on Windows?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"If you installed with WinGet, run winget uninstall Anthropic.ClaudeCode. If you used the PowerShell native installer, remove $env:USERPROFILE\\\\.local\\\\bin\\\\claude.exe and the $env:USERPROFILE\\\\.local\\\\share\\\\claude directory. To wipe config, also delete $env:USERPROFILE\\\\.claude and $env:USERPROFILE\\\\.claude.json. The Claude Desktop app is separate: uninstall it from Settings > Apps.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"How do I uninstall Claude Code on macOS?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Depends on how you installed. Homebrew: brew uninstall --cask claude-code (or claude-code@latest). Native installer: rm -f ~\/.local\/bin\/claude && rm -rf ~\/.local\/share\/claude. npm: npm uninstall -g @anthropic-ai\/claude-code. For a full removal, also run rm -rf ~\/.claude ~\/.claude.json and drag Claude.app to the Trash if you had the desktop app.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Will uninstalling Claude Code cancel my Anthropic subscription?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"No. Your Claude Pro, Max, Team, or Enterprise plan is a billing relationship with Anthropic, tied to your account. Deleting the CLI on your machine does nothing to it. To cancel, sign in at claude.ai and change your plan there. This is worth checking before you uninstall in a rage, because the two are unrelated.\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Should I back up ~\/.claude before deleting it?\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"Yes if you have configured any MCP servers, written custom slash commands, or built up a set of allowed tools you would rather not re-approve. tar -czf claude-backup-$(date +%Y%m%d).tgz ~\/.claude ~\/.claude.json is thirty seconds of insurance. On a clean reinstall you can restore the tarball and skip most of the setup.\"\n      }\n    }\n  ]\n}\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>The full uninstall checklist for Claude Code in 2026: native installer, Homebrew, WinGet, apt\/dnf\/apk, and the legacy npm path. Plus the config files the uninstall commands leave behind.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Uninstall Claude Code (2026): The Clean Way","rank_math_description":"How to uninstall Claude Code cleanly in 2026: native installer, Homebrew, WinGet, apt\/dnf\/apk, npm legacy path, and the config files those commands leave behind.","rank_math_focus_keyword":"how to uninstall claude code","rank_math_canonical_url":"","rank_math_robots":"","footnotes":""},"categories":[4],"tags":[],"class_list":["post-433","post","type-post","status-publish","format-standard","hentry","category-ai"],"_links":{"self":[{"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/posts\/433","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/comments?post=433"}],"version-history":[{"count":0,"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/posts\/433\/revisions"}],"wp:attachment":[{"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/media?parent=433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/categories?post=433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abrarqasim.com\/blog\/wp-json\/wp\/v2\/tags?post=433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}