How to uninstall Bun on Windows
Bun is a command-line runtime, so removing it is mostly about the program itself: your projects, their node_modules and their bun.lock files stay where they are. If you ran bun install, Bun also keeps a global package cache in your profile that you may want to clear afterwards. This guide covers Bun installed per-user from the Oven-sh.Bun winget package, which winget installs as a portable package.
Stop anything running on Bun
Bun has no window or tray icon. Stop any dev server, script or bun --watch you started, then check Task Manager (Ctrl+Shift+Esc) for any bun.exe still listed before you uninstall.
Remove it with winget
Bun from winget is a portable package, so remove it the same way:
winget uninstall --id Oven-sh.Bun
For portable packages winget also offers --purge, which removes every file in the package folder, including anything written there after the install. It does not reach your projects or the cache below.
Where the data lives
| Location | What it holds | What to do |
|---|---|---|
%LOCALAPPDATA%\Microsoft\WinGet\Packages\Oven-sh.Bun_Microsoft.Winget.Source_8wekyb3d8bbwe |
The Bun program winget installed | winget removes it with the package |
Each project's node_modules and bun.lock |
Dependencies and lockfile of that project | Belong to the project; removing Bun does not touch them |
If you ran bun install, Bun's cache documentation puts downloaded packages in %USERPROFILE%\.bun\install\cache. It is safe to remove, since Bun downloads them again when needed. This test never ran bun install, so the cache did not appear here.
Check the result
Run these read-only commands after the uninstall finishes:
Get-Process bun -ErrorAction SilentlyContinue
winget list --id Oven-sh.Bun
Get-Command bun -ErrorAction SilentlyContinue
Test-Path "$env:LOCALAPPDATA\Microsoft\WinGet\Packages\Oven-sh.Bun_Microsoft.Winget.Source_8wekyb3d8bbwe"
Test-Path "$env:USERPROFILE\.bun"
- No output from
Get-Processonly means this query observed no matching process; a suppressed error leaves the running state unknown. - A completed
winget listquery with no match means the package record is gone; a matching row means the uninstall did not finish. - If
Get-Commandsucceeds without suppressed errors, no output meansbunno longer resolves in this terminal. Open a new terminal before judging, since an old one keeps its old PATH. - The first
Test-PathreturningFalsemeans the package folder is gone;Truemeans files remain there. Test-Path "$env:USERPROFILE\.bun"returningTruemeans the global cache or another Bun install is still there; remove it yourself if you do not need it.
What Mole lists
For Bun installed per-user from winget, the package folder goes with the app row, and Mole removes it through winget. No other rows were listed in this test, since Bun had written nothing outside its package folder. Projects on disk are never part of the list.
What this test covered
Tested on 2026-09-28 with Bun 1.4.2 installed through winget as a per-user portable package, from an elevated session. The uninstall went through winget, which deleted the package folder. Not verified: bun install in a real project, the global cache, or Bun installed with its own install script.
