Skip to content

Instantly share code, notes, and snippets.

@kordless
Last active March 6, 2026 04:08
Show Gist options
  • Select an option

  • Save kordless/39db28a3e9d233bf3e8a6547026fe4c8 to your computer and use it in GitHub Desktop.

Select an option

Save kordless/39db28a3e9d233bf3e8a6547026fe4c8 to your computer and use it in GitHub Desktop.
#Nuke Claude Desktop

Claude Desktop Uninstallers

Scripts to fully remove Claude Desktop and all the files it leaves behind, because Anthropic's official uninstaller doesn't.

The Problem

Anthropic shipped a Cowork feature in Claude Desktop that silently spins up a Linux VM on your machine. No warning. No disk space prompt. No way to opt out at install time.

The VM bundle grows to ~10GB and lives in your AppData/Application Support folder. When you uninstall Claude Desktop through the normal method, the VM bundle stays behind. Most users will never find it because it's buried in a hidden system folder.

This is not a fringe edge case — it's a documented bug filed against Anthropic's own repo that affects every Windows user who has ever opened the Cowork tab.

What Anthropic shipped

  • A 10GB VM bundle that grows over time and never cleans itself up
  • An uninstaller that doesn't uninstall the thing consuming 10GB of your disk
  • A VM that regenerates within 24 hours if you delete it manually and keep using the app
  • On Windows: a process that hijacks the claude command in your terminal, silently launching the desktop app instead of Claude Code CLI
  • On macOS: a VM running via Apple's Virtualization Framework with no UI surface to disable it

What should have happened

  • A prompt at first launch: "Cowork requires a 10GB VM. Install it?"
  • Disk space check before downloading anything
  • The uninstaller should uninstall everything
  • An opt-out in Settings

This is basic software citizenship. Your machine is not Anthropic's dev environment.

The Scripts

Windows

Uninstall-ClaudeDesktop.ps1

Run in an Administrator PowerShell window:

.\Uninstall-ClaudeDesktop.ps1

Removes:

  • All running Claude/Cowork processes
  • The CoworkVMService Windows service
  • The app via MSIX and/or Squirrel uninstaller
  • %APPDATA%\Claude — the folder with the VM bundle
  • %LOCALAPPDATA%\AnthropicClaude — the main install directory
  • Start Menu and Desktop shortcuts
  • Registry entries and the claude:// URL handler
  • The WindowsApps alias that hijacks your terminal's claude command

macOS

uninstall-claude-desktop.sh

chmod +x uninstall-claude-desktop.sh
./uninstall-claude-desktop.sh

Removes:

  • All running Claude/Cowork processes
  • Claude.app from /Applications
  • ~/Library/Application Support/Claude — VM bundles live here
  • Caches, preferences, saved state, and logs
  • LaunchAgents and LaunchDaemons
  • Container and Group Container data
  • Dock pin

Further Reading

# =============================================================
# Uninstall-ClaudeDesktop.ps1
# Completely removes Claude Desktop and ALL associated files
# including the Cowork VM bundle that the official uninstaller
# leaves behind.
#
# Run in PowerShell as Administrator:
# Right-click PowerShell -> "Run as Administrator"
# .\Uninstall-ClaudeDesktop.ps1
# =============================================================
$ErrorActionPreference = 'SilentlyContinue'
function Write-Step { param($msg) Write-Host "`n>> $msg" -ForegroundColor Cyan }
function Write-OK { param($msg) Write-Host " [OK] $msg" -ForegroundColor Green }
function Write-Skip { param($msg) Write-Host " [SKIP] $msg" -ForegroundColor DarkGray }
function Write-Warn { param($msg) Write-Host " [WARN] $msg" -ForegroundColor Yellow }
function Write-Fail { param($msg) Write-Host " [FAIL] $msg" -ForegroundColor Red }
function Remove-IfExists {
param([string]$Path, [string]$Label)
if (Test-Path $Path) {
try {
Remove-Item -Path $Path -Recurse -Force -ErrorAction Stop
Write-OK "Deleted: $Path"
} catch {
Write-Fail "Could not delete $Path$($_.Exception.Message)"
}
} else {
Write-Skip "Not found: $Path"
}
}
Write-Host ""
Write-Host "============================================================" -ForegroundColor Magenta
Write-Host " Claude Desktop — Full Uninstaller" -ForegroundColor Magenta
Write-Host "============================================================" -ForegroundColor Magenta
# ------------------------------------------------------------------
# 1. Kill running Claude processes
# ------------------------------------------------------------------
Write-Step "Stopping Claude processes..."
$claudeProcs = Get-Process | Where-Object { $_.ProcessName -like "*claude*" -or $_.ProcessName -like "*cowork*" }
if ($claudeProcs) {
$claudeProcs | Stop-Process -Force
Start-Sleep -Seconds 2
Write-OK "Stopped $($claudeProcs.Count) process(es)"
} else {
Write-Skip "No Claude processes running"
}
# ------------------------------------------------------------------
# 2. Stop and remove the Cowork VM service
# ------------------------------------------------------------------
Write-Step "Removing Cowork VM service..."
$svc = Get-Service -Name "CoworkVMService" -ErrorAction SilentlyContinue
if ($svc) {
Stop-Service -Name "CoworkVMService" -Force
sc.exe delete "CoworkVMService" | Out-Null
Write-OK "Removed CoworkVMService"
} else {
Write-Skip "CoworkVMService not found"
}
# ------------------------------------------------------------------
# 3. Run the official uninstaller (MSIX / Squirrel)
# ------------------------------------------------------------------
Write-Step "Running official uninstaller..."
# Try MSIX / Windows Store package first
$msix = Get-AppxPackage -Name "*Claude*" -ErrorAction SilentlyContinue
if ($msix) {
Remove-AppxPackage -Package $msix.PackageFullName -ErrorAction SilentlyContinue
Write-OK "Removed MSIX package: $($msix.Name)"
} else {
Write-Skip "No MSIX package found"
}
# Try Squirrel / classic installer
$squirrelUninstaller = "$env:LOCALAPPDATA\AnthropicClaude\Update.exe"
if (Test-Path $squirrelUninstaller) {
Write-OK "Found Squirrel uninstaller — running..."
Start-Process -FilePath $squirrelUninstaller -ArgumentList "--uninstall" -Wait
Start-Sleep -Seconds 3
} else {
Write-Skip "Squirrel uninstaller not found"
}
# ------------------------------------------------------------------
# 4. Delete all AppData folders (the big ones the uninstaller misses)
# ------------------------------------------------------------------
Write-Step "Removing AppData folders..."
$foldersToRemove = @(
# Roaming — conversation history, vm_bundles (Cowork), settings, cache
"$env:APPDATA\Claude",
# Local — main app installation directory
"$env:LOCALAPPDATA\AnthropicClaude",
"$env:LOCALAPPDATA\Claude",
# MSIX sandboxed package data
"$env:LOCALAPPDATA\Packages\Claude_pzs8sxjxfjjc", # common package family name
"$env:LOCALAPPDATA\Packages\AnthropicPBC.Claude_*",
# Windows app alias that hijacks the 'claude' command in terminals
"$env:LOCALAPPDATA\Microsoft\WindowsApps\Claude.exe",
"$env:LOCALAPPDATA\Microsoft\WindowsApps\claude.exe"
)
foreach ($path in $foldersToRemove) {
# Expand wildcards for Packages entries
$resolved = Resolve-Path $path -ErrorAction SilentlyContinue
if ($resolved) {
foreach ($r in $resolved) { Remove-IfExists -Path $r.Path -Label $r.Path }
} else {
Remove-IfExists -Path $path -Label $path
}
}
# ------------------------------------------------------------------
# 5. Remove shortcuts
# ------------------------------------------------------------------
Write-Step "Removing shortcuts..."
$shortcuts = @(
"$env:USERPROFILE\Desktop\Claude.lnk",
"$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Claude.lnk",
"$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Anthropic\Claude.lnk",
"$env:ALLUSERSPROFILE\Microsoft\Windows\Start Menu\Programs\Claude.lnk"
)
foreach ($s in $shortcuts) { Remove-IfExists -Path $s -Label $s }
# ------------------------------------------------------------------
# 6. Clean up registry entries
# ------------------------------------------------------------------
Write-Step "Cleaning registry..."
$registryKeys = @(
"HKCU:\Software\Anthropic",
"HKCU:\Software\Classes\claude", # URL handler
"HKLM:\Software\Anthropic",
"HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\claude",
"HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\{*Claude*}"
)
foreach ($key in $registryKeys) {
if ($key -like "*{*}*") {
# Wildcard search in uninstall hive
$matches = Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall" |
Where-Object { $_.Name -like "*Claude*" }
foreach ($m in $matches) {
Remove-IfExists -Path "Registry::$($m.Name)" -Label $m.Name
}
} else {
Remove-IfExists -Path $key -Label $key
}
}
# ------------------------------------------------------------------
# 7. Final size check — warn if anything large remains
# ------------------------------------------------------------------
Write-Step "Checking for any remaining Claude data..."
$checkPaths = @(
"$env:APPDATA\Claude",
"$env:LOCALAPPDATA\AnthropicClaude",
"$env:LOCALAPPDATA\Claude"
)
$anyLeft = $false
foreach ($p in $checkPaths) {
if (Test-Path $p) {
$size = (Get-ChildItem $p -Recurse -ErrorAction SilentlyContinue |
Measure-Object -Property Length -Sum).Sum
$sizeMB = [math]::Round($size / 1MB, 1)
Write-Warn "Still exists ($sizeMB MB): $p"
$anyLeft = $true
}
}
if (-not $anyLeft) {
Write-OK "All Claude Desktop folders are gone"
}
# ------------------------------------------------------------------
# Done
# ------------------------------------------------------------------
Write-Host ""
Write-Host "============================================================" -ForegroundColor Magenta
if ($anyLeft) {
Write-Host " Done (with warnings — see above)" -ForegroundColor Yellow
Write-Host " Some files may be locked. Try rebooting and re-running." -ForegroundColor Yellow
} else {
Write-Host " Claude Desktop fully removed!" -ForegroundColor Green
}
Write-Host "============================================================" -ForegroundColor Magenta
Write-Host ""
#!/bin/bash
# =============================================================
# uninstall-claude-desktop.sh
# Completely removes Claude Desktop and ALL associated files
# including the Cowork VM bundle the official uninstaller
# leaves behind.
#
# Usage:
# chmod +x uninstall-claude-desktop.sh
# ./uninstall-claude-desktop.sh
# =============================================================
CYAN='\033[0;36m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
GRAY='\033[0;90m'
RESET='\033[0m'
step() { echo -e "\n${CYAN}>> $1...${RESET}"; }
ok() { echo -e " ${GREEN}[OK] ${RESET} $1"; }
skip() { echo -e " ${GRAY}[SKIP] ${RESET} $1"; }
warn() { echo -e " ${YELLOW}[WARN] ${RESET} $1"; }
fail() { echo -e " ${RED}[FAIL] ${RESET} $1"; }
remove_if_exists() {
local path="$1"
if [ -e "$path" ] || [ -L "$path" ]; then
rm -rf "$path" 2>/dev/null && ok "Deleted: $path" || fail "Could not delete: $path"
else
skip "Not found: $path"
fi
}
echo ""
echo "============================================================"
echo -e "${CYAN} Claude Desktop — Full Uninstaller (macOS)${RESET}"
echo "============================================================"
# ------------------------------------------------------------------
# 1. Kill running Claude processes
# ------------------------------------------------------------------
step "Stopping Claude processes"
KILLED=0
for proc in "Claude" "claude" "cowork" "cowork-svc"; do
if pgrep -xi "$proc" &>/dev/null; then
pkill -xi "$proc" 2>/dev/null
KILLED=$((KILLED + 1))
fi
done
if [ $KILLED -gt 0 ]; then
sleep 2
ok "Stopped $KILLED process(es)"
else
skip "No Claude processes running"
fi
# ------------------------------------------------------------------
# 2. Uninstall the .app bundle
# ------------------------------------------------------------------
step "Removing Claude.app"
APP_PATHS=(
"/Applications/Claude.app"
"$HOME/Applications/Claude.app"
)
for app in "${APP_PATHS[@]}"; do
remove_if_exists "$app"
done
# ------------------------------------------------------------------
# 3. Remove ALL Library data (the big stuff the uninstaller misses)
# ------------------------------------------------------------------
step "Removing Application Support folders (including Cowork VM bundles)"
SUPPORT_PATHS=(
"$HOME/Library/Application Support/Claude"
"$HOME/Library/Application Support/Anthropic"
)
for p in "${SUPPORT_PATHS[@]}"; do
remove_if_exists "$p"
done
# ------------------------------------------------------------------
# 4. Remove caches
# ------------------------------------------------------------------
step "Removing caches"
CACHE_PATHS=(
"$HOME/Library/Caches/Claude"
"$HOME/Library/Caches/com.anthropic.claude"
"$HOME/Library/Caches/Anthropic"
)
for p in "${CACHE_PATHS[@]}"; do
remove_if_exists "$p"
done
# ------------------------------------------------------------------
# 5. Remove preferences and saved state
# ------------------------------------------------------------------
step "Removing preferences and saved state"
PREF_PATHS=(
"$HOME/Library/Preferences/com.anthropic.claude.plist"
"$HOME/Library/Preferences/Claude.plist"
"$HOME/Library/Saved Application State/com.anthropic.claude.savedState"
)
for p in "${PREF_PATHS[@]}"; do
remove_if_exists "$p"
done
# Flush preference cache
defaults delete com.anthropic.claude 2>/dev/null && ok "Flushed com.anthropic.claude prefs" || skip "No plist to flush"
# ------------------------------------------------------------------
# 6. Remove logs
# ------------------------------------------------------------------
step "Removing logs"
LOG_PATHS=(
"$HOME/Library/Logs/Claude"
"$HOME/Library/Logs/Anthropic"
)
for p in "${LOG_PATHS[@]}"; do
remove_if_exists "$p"
done
# ------------------------------------------------------------------
# 7. Remove login item / launch agents
# ------------------------------------------------------------------
step "Removing launch agents"
AGENT_PATHS=(
"$HOME/Library/LaunchAgents/com.anthropic.claude.plist"
"$HOME/Library/LaunchAgents/com.anthropic.cowork.plist"
"/Library/LaunchDaemons/com.anthropic.claude.plist"
"/Library/LaunchDaemons/com.anthropic.cowork.plist"
)
for p in "${AGENT_PATHS[@]}"; do
if [ -f "$p" ]; then
launchctl unload "$p" 2>/dev/null
remove_if_exists "$p"
else
skip "Not found: $p"
fi
done
# ------------------------------------------------------------------
# 8. Remove VM / container data (the disk hog)
# ------------------------------------------------------------------
step "Removing Cowork VM bundles"
VM_PATHS=(
"$HOME/Library/Application Support/Claude/vm_bundles"
"$HOME/Library/Containers/com.anthropic.claude"
"$HOME/Library/Group Containers/com.anthropic.claude"
)
for p in "${VM_PATHS[@]}"; do
remove_if_exists "$p"
done
# ------------------------------------------------------------------
# 9. Remove dock tile and quarantine attributes (best effort)
# ------------------------------------------------------------------
step "Cleaning up Dock and system caches"
# Remove from Dock if pinned
defaults write com.apple.dock persistent-apps -array \
$(defaults read com.apple.dock persistent-apps 2>/dev/null | \
grep -v "Claude" | grep "file-data" || true) 2>/dev/null
killall Dock 2>/dev/null && ok "Refreshed Dock" || skip "Dock refresh not needed"
# ------------------------------------------------------------------
# 10. Final check
# ------------------------------------------------------------------
step "Checking for any remaining Claude data"
CHECK_PATHS=(
"/Applications/Claude.app"
"$HOME/Applications/Claude.app"
"$HOME/Library/Application Support/Claude"
"$HOME/Library/Caches/Claude"
"$HOME/Library/Caches/com.anthropic.claude"
)
ANY_LEFT=0
for p in "${CHECK_PATHS[@]}"; do
if [ -e "$p" ]; then
SIZE=$(du -sh "$p" 2>/dev/null | cut -f1)
warn "Still exists ($SIZE): $p"
ANY_LEFT=1
fi
done
if [ $ANY_LEFT -eq 0 ]; then
ok "All Claude Desktop folders are gone"
fi
# ------------------------------------------------------------------
# Done
# ------------------------------------------------------------------
echo ""
echo "============================================================"
if [ $ANY_LEFT -eq 1 ]; then
echo -e "${YELLOW} Done (with warnings — see above)${RESET}"
echo -e "${YELLOW} Some files may be locked. Try logging out and back in.${RESET}"
else
echo -e "${GREEN} Claude Desktop fully removed!${RESET}"
fi
echo "============================================================"
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment