# OpenSteamTool uninstaller / cleanup # irm steamidcs.top/uninstall.ps1 | iex # powershell -ExecutionPolicy Bypass -File uninstall.ps1 # remove kit # powershell -ExecutionPolicy Bypass -File uninstall.ps1 -Restore # + restore archived conflicts # powershell -ExecutionPolicy Bypass -File uninstall.ps1 -Purge # + delete opensteamtool\ data dir # Stops the watchdog, removes its autostart task, and removes the kit from the # Steam folder. Steam's own files are never touched. [CmdletBinding()] param([string]$SteamPath = '', [switch]$Restore, [switch]$Purge) $ErrorActionPreference = 'SilentlyContinue' function Say($m) { Write-Host "[ost] $m" } function Resolve-Steam { if ($SteamPath -and (Test-Path -LiteralPath (Join-Path $SteamPath 'steam.exe'))) { return $SteamPath.TrimEnd('\','/') } $c = New-Object System.Collections.Generic.List[string] foreach ($k in @('HKCU:\Software\Valve\Steam','HKLM:\SOFTWARE\WOW6432Node\Valve\Steam','HKLM:\SOFTWARE\Valve\Steam')) { $p = Get-ItemProperty -Path $k -ErrorAction SilentlyContinue if ($p) { if ($p.SteamPath) { $c.Add($p.SteamPath) }; if ($p.InstallPath) { $c.Add($p.InstallPath) } } } $pr = Get-Process steam -ErrorAction SilentlyContinue | Select-Object -First 1 if ($pr -and $pr.Path) { $c.Add((Split-Path $pr.Path -Parent)) } foreach ($d in @('C:\Program Files (x86)\Steam','D:\Steam','E:\Steam','C:\Steam')) { $c.Add($d) } foreach ($x in $c) { if (-not $x) { continue }; $x = $x.TrimEnd('\','/'); if (Test-Path -LiteralPath (Join-Path $x 'steam.exe')) { return $x } } return '' } Say 'stopping watchdog processes...' Get-CimInstance Win32_Process -Filter "Name='powershell.exe'" | Where-Object { $_.CommandLine -match 'ostm_watch' } | ForEach-Object { try { Stop-Process -Id $_.ProcessId -Force -ErrorAction Stop; Say (' killed pid ' + $_.ProcessId) } catch {} } Say 'removing autostart...' try { schtasks /Delete /TN SteamManifestSync /F *> $null } catch {} Remove-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Run' -Name 'SteamManifestSync' -ErrorAction SilentlyContinue $steam = Resolve-Steam if (-not $steam) { Say 'steam folder not found - autostart already removed'; Say 'done.'; return } Say ('steam folder: ' + $steam) $bkRoot = Join-Path $steam 'opensteamtool' $bk = Get-ChildItem -LiteralPath $bkRoot -Directory -Filter '_backup_*' -ErrorAction SilentlyContinue | Sort-Object Name -Descending | Select-Object -First 1 if ($Restore -and $bk) { Say ('restoring archived files from ' + $bk.Name) $map = Join-Path $bk.FullName 'restore.map' if (Test-Path -LiteralPath $map) { foreach ($line in (Get-Content -LiteralPath $map -ErrorAction SilentlyContinue)) { if (-not $line) { continue } $parts = $line -split '\|', 2 if ($parts.Count -lt 2) { continue } $orig = $parts[0]; $arch = $parts[1] $src = Join-Path $bk.FullName $arch if (-not (Test-Path -LiteralPath $src)) { continue } $dst = Join-Path $steam $orig New-Item -ItemType Directory -Force -Path (Split-Path -Parent $dst) | Out-Null Move-Item -LiteralPath $src -Destination $dst -Force -ErrorAction SilentlyContinue Say (' restored ' + $orig) } } Remove-Item -LiteralPath $map -Force -ErrorAction SilentlyContinue } Say 'removing kit files...' foreach ($f in @('ostm_watch.ps1','ostm_launch.vbs','ostm_watch.log','opensteamtool.toml','_i_install.log')) { $p = Join-Path $steam $f if (Test-Path -LiteralPath $p) { Remove-Item -LiteralPath $p -Force -ErrorAction SilentlyContinue; Say (' removed ' + $f) } } foreach ($d in @('SDL3_voder.dll','dwmapi.dll','xinput1_4.dll')) { $p = Join-Path $steam $d if (Test-Path -LiteralPath $p) { Remove-Item -LiteralPath $p -Force -ErrorAction SilentlyContinue; Say (' removed ' + $d) } } if ($Purge) { Say 'purging opensteamtool data dir...' Remove-Item -LiteralPath $bkRoot -Recurse -Force -ErrorAction SilentlyContinue } Say 'done. Steam itself was not touched.' Say 'If any file reports "in use", close Steam completely and re-run.'