Skip to content

[Feat] Allow uninstalling/cleaning up partially installed games #5655#5656

Open
MateoGonzalezLourido wants to merge 11 commits into
Heroic-Games-Launcher:mainfrom
MateoGonzalezLourido:fix-partial-legendary-downloads
Open

[Feat] Allow uninstalling/cleaning up partially installed games #5655#5656
MateoGonzalezLourido wants to merge 11 commits into
Heroic-Games-Launcher:mainfrom
MateoGonzalezLourido:fix-partial-legendary-downloads

Conversation

@MateoGonzalezLourido

@MateoGonzalezLourido MateoGonzalezLourido commented Jun 10, 2026

Copy link
Copy Markdown

related to #5655
When a Legendary game download is interrupted , the partially downloaded files are left on disk but the game is not marked as installed. There was no way to clean them up from the UI since the uninstall option was only shown for fully installed games.

This fix handles partial install cleanup entirely within Heroic, using existing infrastructure, without requiring any changes to Legendary itself.
What changes:

library.ts: stores the install folder path in localStorage when a download starts, so it can be recovered even if Legendary crashes before writing its own state

hasPartialInstall.ts: new hook that reads that stored path and exposes hasPartialInstall / partialInstallFolder to components

GameCard and GameSubMenu: show the uninstall option when a partial install is detected, not only when isInstalled is true

UninstallModal: accepts and forwards partialInstallFolder down the call chain
uninstaller.ts and ipc.ts: pass partialInstallFolder through to the game manager

games.ts (LegendaryGameManager.uninstall): if the game is not installed but a partialInstallFolder is provided, calls removeFolder directly and triggers a library refresh, skipping the normal Legendary CLI uninstall flow

library.ts (backend): guards against empty stdout from legendary info before attempting JSON parse, preventing a crash when legendary returns nothing for a partially downloaded game


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@MateoGonzalezLourido

Copy link
Copy Markdown
Author

If anyone can help me test this feature, I'd appreciate it. It works for me, but I have all my files in the usual Heroic path. If it works for someone using different drives, etc., then great.

Even so, if it works for me, it should work for everyone; I'm not creating anything new.

@MateoGonzalezLourido

Copy link
Copy Markdown
Author

I love this feature; it adds so much convenience.

@MateoGonzalezLourido

MateoGonzalezLourido commented Jun 11, 2026

Copy link
Copy Markdown
Author

Post-added changes:

Added an icon on the game card to indicate that local game files are present on disk

Uninstalling is now allowed while a game is queued, downloading or updating (The download is cancelled and then uninstalled, thus bypassing the restriction that prevents this.)

Download cache is now reset on uninstall, matching Legendary's behavior

Removed install status icon when a game is queued or actively downloading

@MateoGonzalezLourido MateoGonzalezLourido changed the title Allow uninstalling/cleaning up partially installed games Allow uninstalling/cleaning up partially installed games #5655 Jun 11, 2026
@MateoGonzalezLourido MateoGonzalezLourido changed the title Allow uninstalling/cleaning up partially installed games #5655 [feature] Allow uninstalling/cleaning up partially installed games #5655 Jun 11, 2026
@MateoGonzalezLourido MateoGonzalezLourido changed the title [feature] Allow uninstalling/cleaning up partially installed games #5655 [Feat] Allow uninstalling/cleaning up partially installed games #5655 Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant