stacklok / stacklok/toolhive-studio
[Bug] Old versions are left behind on Windows
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 167
- Forks
- 24
- Avg merge
- 11h 32m
- Merged PRs (30d)
- 91
Description
Bug Description
The Windows update process doesn't clean up old versions.
Due to the way install/upgrade works on Windows to account for file locking (can't replace a running .exe in-place), each version is installed into its own version-specific folder, %LOCALAPPDATA%\ToolHive\app-0.x.x.
These folders are not cleaned up during the upgrade process. Each one consumes about 380MB of disk space.
Since we need to have two coexisting (your currently running version, and the new one just downloaded but not yet restarted into), we might want to clean up all others? (a simple n-2 and older might not even work, because several intervening versions might have been downloaded but restart deferred).
Not sure if this is a configurable option in the updater (not sure if this is a Squirrel or Electron thing), or something we'd have to handle ourselves.
Steps to Reproduce
- Install an older version of ToolHive on Windows
- Let the upgrade happen
- Look in the
%LOCALAPPDATA%\ToolHivefolder and note the multipleapp-<version>folders present
Expected Behavior
Older versions should be cleaned up
Actual Behavior
Old versions are left behind
Priority
Medium
Environment
- OS: Windows 11
- ToolHive version: all
Additional Context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by locating the Windows update or installer handling that creates version-specific folders under %LOCALAPPDATA%\ToolHive, then determine whether cleanup belongs to the updater or the application. Done means upgrades remove obsolete versions while retaining the running version and the newly downloaded version needed for restart.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop, operating-systems, release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100