WSABuilds icon indicating copy to clipboard operation
WSABuilds copied to clipboard

[BUG]After the above solution, applications continue to appear in WSA even though I removed them.

Open silver770 opened this issue 1 month ago • 1 comments

Describe the bug

After removing an app via WSA or even via ADB, I still see the icon as if the app is installed. It's not that there is data left in DATE because there is no such folder. This is a problem caused by WSA duplication. It probably saves files in duplicate and despite deletion, they remain in another place. I would appreciate help. How do I delete them? I don't want to reset WSA. I don't mean deleting the shortcuts from the start page. I already did that.

Image Image

Steps to reproduce the issue

....

Expected behaviour

.....

Downloaded Build Of WSA

....

Windows build number

....

PC Specification

....

Additional context

No response

silver770 avatar Nov 18 '25 18:11 silver770

Hi @silver770,

Here's the exact method from WSABuilds documentation:

Steps to Remove Ghost Apps:

  1. Open Registry Editor (regedit.exe) as Administrator
  2. Navigate to:

Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

  1. Find the ghost app entries (e.g., com.whatsapp)
  2. Delete the entries for apps that don't exist in WSA
  3. Restart your PC
  4. Ghost apps will disappear from WSA Settings

This method is safe and only removes registry entries, not actual apps👍

Source: https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/General%20Usage%20Guides/Remove%20Non%20Existent%20Entries.md

PowerShell Alternative:

# Remove specific ghost app
Remove-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\com.whatsapp" -Recurse -Force -ErrorAction SilentlyContinue

WSA_AutoGhostCleaner.ps1 - SAFE Automatically Find & Remove ALL Ghosts

function Remove-AllWSAGhosts {
    Write-Host "=== WSA AUTO GHOST CLEANER ===" -ForegroundColor Cyan
    
    # 1. Check if WSA is running and connected
    Write-Host "Checking WSA connection..." -ForegroundColor Yellow
    $devices = adb devices 2>$null
    if ($devices -notlike "*device*") {
        Write-Host "❌ WSA is not connected! Please start WSA first." -ForegroundColor Red
        Write-Host "   Open 'Windows Subsystem for Android' and try again." -ForegroundColor Yellow
        return
    }
    
    # 2. Get installed apps from WSA
    Write-Host "Scanning installed apps in WSA..." -ForegroundColor Yellow
    $installedApps = adb shell "pm list packages" 2>$null
    if (-not $installedApps) {
        Write-Host "❌ Cannot get app list from WSA! Is WSA running?" -ForegroundColor Red
        return
    }
    
    # 3. Get all registry entries
    Write-Host "Scanning Windows Registry..." -ForegroundColor Yellow
    $registryEntries = Get-ChildItem "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
    
    # 4. Find and remove ghosts
    $ghostCount = 0
    foreach ($entry in $registryEntries) {
        $packageName = $entry.PSChildName
        
        # Check if it's a WSA app but NOT installed
        if ($packageName -like "com.*" -and $installedApps -notmatch $packageName) {
            Write-Host "🚫 Removing ghost: $packageName" -ForegroundColor Red
            Remove-Item $entry.PSPath -Recurse -Force -ErrorAction SilentlyContinue
            $ghostCount++
        }
    }
    
    # 5. Results
    if ($ghostCount -eq 0) {
        Write-Host "✅ No ghost apps found!" -ForegroundColor Green
    } else {
        Write-Host "✅ Removed $ghostCount ghost apps!" -ForegroundColor Green
    }
}

Usage examples - ONLY for ghost apps:

Remove-AllWSAGhosts

ihsansencan avatar Nov 21 '25 23:11 ihsansencan