Skip to content

Commit 564b4fa

Browse files
committed
fix: uninstall now removes cached uv libs and py libs correctly
1 parent c77e176 commit 564b4fa

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Setup/uninstall_frontend.ps1

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,16 @@ if (Get-Command ffmpeg -ErrorAction SilentlyContinue) {
130130
Write-Step "uv"
131131
if (Get-Command uv -ErrorAction SilentlyContinue) {
132132
if (Prompt-YesNo " Remove uv?") {
133-
# Remove uv's Python and package cache before uninstalling the tool itself
134-
$uvCache = "$env:LOCALAPPDATA\uv"
135-
if (Test-Path $uvCache) {
136-
Remove-Item -Recurse -Force $uvCache
137-
Write-OK "Removed uv cache at $uvCache"
133+
# Remove uv's package cache and Python versions before uninstalling the tool
134+
$uvPackageCache = "$env:LOCALAPPDATA\uv"
135+
$uvPythonCache = "$env:APPDATA\uv"
136+
if (Test-Path $uvPackageCache) {
137+
Remove-Item -Recurse -Force $uvPackageCache
138+
Write-OK "Removed uv package cache at $uvPackageCache"
139+
}
140+
if (Test-Path $uvPythonCache) {
141+
Remove-Item -Recurse -Force $uvPythonCache
142+
Write-OK "Removed uv Python cache at $uvPythonCache"
138143
}
139144
winget uninstall --id astral-sh.uv
140145
if ($LASTEXITCODE -ne 0) {

0 commit comments

Comments
 (0)