stacklok / stacklok/toolhive-studio

[Bug] Old versions are left behind on Windows

Open
#578 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
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
  1. Install an older version of ToolHive on Windows
  2. Let the upgrade happen
  3. Look in the %LOCALAPPDATA%\ToolHive folder and note the multiple app-<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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.