Skip to content

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

Claude Desktop - Clean Reinstall Script

A PowerShell script to completely remove and reinstall Claude Desktop, fixing Cowork virtualization issues.

🎯 What It Does

This script performs a complete clean reinstall of Claude Desktop with special attention to fixing the Cowork feature's virtualization requirements.

Features

  • βœ… Enables virtualization - Hyper-V, Virtual Machine Platform, Windows Hypervisor Platform
  • βœ… Stops/removes CoworkVMService - Cleans up the Cowork service
  • βœ… Full uninstallation - Removes MSIX packages and registry entries
  • βœ… Deletes AppData - Cleans up all user data folders
  • βœ… Auto-downloads installer - Gets the latest Claude Desktop version
  • βœ… Runs installer - Launches the installer as Administrator
  • βœ… Color-coded output - Easy-to-read progress indicators

πŸš€ Quick Start

Prerequisites

  • Windows 10/11
  • PowerShell 5.1 or higher
  • Administrator privileges (script will fail without them)

One-Line Run

# Download and run directly
irm https://raw.githubusercontent.com/kbaker827/claude-clean-reinstall/main/Reset-ClaudeDesktop.ps1 | iex

Or download and run manually:

# 1. Download the script
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/kbaker827/claude-clean-reinstall/main/Reset-ClaudeDesktop.ps1" -OutFile "$env:TEMP\Reset-ClaudeDesktop.ps1"

# 2. Run as Administrator
Start-Process powershell.exe -ArgumentList "-ExecutionPolicy Bypass -File $env:TEMP\Reset-ClaudeDesktop.ps1" -Verb RunAs

Step-by-Step

  1. Right-click PowerShell β†’ Run as Administrator
  2. Navigate to the script folder:
    cd C:\Path\To\Script
  3. Run the script:
    .\Reset-ClaudeDesktop.ps1

πŸ“‹ What the Script Does

Step 1: Check Virtualization Support

Checks and enables required Windows features for Cowork:

  • Microsoft-Hyper-V-All
  • VirtualMachinePlatform
  • HypervisorPlatform

⚠️ May require reboot if features were just enabled.

Step 2: Stop CoworkVMService

Stops and removes the CoworkVMService to prevent conflicts during reinstall.

Step 3: Uninstall Claude Desktop

Removes:

  • MSIX packaged app
  • Registry uninstaller entries
  • Traditional installer remnants

Step 4: Clean AppData

Deletes these folders:

%APPDATA%\Claude
%LOCALAPPDATA%\Claude
%LOCALAPPDATA%\Packages\Claude_pzs8sxjxfjjc

Step 5: Download Installer

Downloads the latest Claude Desktop installer from the official source:

https://storage.googleapis.com/osprey-downloads/.../Claude-Setup-x64.exe

Step 6: Run Installer

Launches the installer with Administrator privileges and waits for completion.

πŸ–₯️ Output Example

>> Checking virtualization support...
   [OK] Hyper-V: Already enabled
   [OK] Virtual Machine Platform: Already enabled
   [OK] Windows Hypervisor Platform: Already enabled

>> Stopping CoworkVMService...
   [OK] CoworkVMService not found (already clean)

>> Uninstalling Claude Desktop...
   [OK] No MSIX package found

>> Cleaning up AppData folders...
   [OK] Not found (skip): C:\Users\...\AppData\Roaming\Claude
   [OK] Deleted: C:\Users\...\AppData\Local\Claude
   [OK] Not found (skip): C:\Users\...\AppData\Local\Packages\Claude_pzs8sxjxfjjc

>> Downloading latest Claude Desktop installer...
   [OK] Downloaded to: C:\Users\...\AppData\Local\Temp\ClaudeSetup.exe

>> Running installer...
   The installer window will open. Follow the prompts.
   [OK] Installer completed

============================================================
 Done! Launch Claude Desktop and check the Cowork tab.
 If Cowork still fails, check Event Viewer:
   Event Viewer > Windows Logs > Application
============================================================

⚠️ Troubleshooting

"This script requires administrator privileges"

You must run PowerShell as Administrator. Right-click PowerShell β†’ "Run as Administrator"

"Could not enable [feature] - blocked by Group Policy"

Your IT department may have disabled virtualization features. Contact your IT admin to enable:

  • Hyper-V
  • Virtual Machine Platform
  • Windows Hypervisor Platform

Download fails

If the auto-download fails, the script will provide a manual download link:

Cowork still doesn't work after reinstall

  1. Check Event Viewer:
    Event Viewer > Windows Logs > Application
    
  2. Look for errors related to "CoworkVMService" or "Claude"
  3. Check Windows Features are enabled:
    Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -like "*Hyper*" -or $_.FeatureName -like "*Virtual*" }

Reboot loop

If the script keeps asking to reboot:

  1. Reboot your computer
  2. Run the script again
  3. The second run should complete without requiring another reboot

πŸ”§ Manual Steps (If Script Fails)

Enable Virtualization Manually

# Run as Administrator
dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /all /norestart
dism /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
dism /online /enable-feature /featurename:HypervisorPlatform /all /norestart

Then reboot and re-run the script.

Uninstall Claude Manually

  1. Windows Settings β†’ Apps β†’ Installed Apps
  2. Find "Claude" β†’ Uninstall
  3. Delete folders:
    %APPDATA%\Claude
    %LOCALAPPDATA%\Claude
    %LOCALAPPDATA%\Packages\Claude_pzs8sxjxfjjc
    

πŸ“ Requirements

  • Windows 10 version 2004+ or Windows 11
  • PowerShell 5.1 or PowerShell 7+
  • Administrator privileges
  • Internet connection (for downloading installer)

πŸ”’ Safety

  • βœ… Backs up nothing - but you can manually backup %APPDATA%\Claude before running
  • βœ… Non-destructive - Only removes Claude-related files
  • βœ… Reversible - You can always reinstall Claude normally

πŸ“„ Files

File Description
Reset-ClaudeDesktop.ps1 Main PowerShell script
README.md This documentation

🀝 Contributing

Found an issue or have an improvement? Open an issue or PR!

πŸ“„ License

MIT License - Free to use and distribute.

πŸ”— Links


Fix Claude Desktop and Cowork issues with one script! πŸš€

About

PowerShell script to completely remove and reinstall Claude Desktop, fixing Cowork virtualization issues

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages