Skip to content

fix(squirrel.mac): clean up old staged updates before downloading new update#49365

Merged
jkleinsc merged 1 commit intoelectron:mainfrom
loc:fix-stacked-update-cleanup
Feb 3, 2026
Merged

fix(squirrel.mac): clean up old staged updates before downloading new update#49365
jkleinsc merged 1 commit intoelectron:mainfrom
loc:fix-stacked-update-cleanup

Conversation

@loc
Copy link
Copy Markdown
Contributor

@loc loc commented Jan 12, 2026

Description of Change

When checkForUpdates() is called while an update is already staged, Squirrel creates a new temporary directory for the download without cleaning up the old one. This can lead to disk usage growth when new versions are released while the app hasn't restarted.

This adds a force parameter to pruneUpdateDirectories that bypasses the AwaitingRelaunch state check. This is called before creating a new temp directory, ensuring old staged updates are cleaned up.

Checklist

Release Notes

Notes: fixed squirrel.mac stacked update behavior to old staged updates

@loc loc requested a review from a team as a code owner January 12, 2026 17:18
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Jan 12, 2026
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Jan 19, 2026
When checkForUpdates() is called while an update is already staged,
Squirrel creates a new temporary directory for the download without
cleaning up the old one. This can lead to disk usage growth when
new versions are released while the app hasn't restarted.

This adds a force parameter to pruneUpdateDirectories that bypasses
the AwaitingRelaunch state check. This is called before creating a
new temp directory, ensuring old staged updates are cleaned up.
@loc loc force-pushed the fix-stacked-update-cleanup branch from f121d07 to 925c441 Compare January 23, 2026 23:28
Copy link
Copy Markdown
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codebytere can you take a look too, but seems fine to me

@VerteDinde VerteDinde added target/39-x-y PR should also be added to the "39-x-y" branch. target/40-x-y PR should also be added to the "40-x-y" branch. target/41-x-y PR should also be added to the "41-x-y" branch. semver/patch backwards-compatible bug fixes labels Jan 31, 2026
@jkleinsc
Copy link
Copy Markdown
Member

jkleinsc commented Feb 3, 2026

Merging as CI failure unrelated to PR change.

@jkleinsc jkleinsc merged commit 233caf8 into electron:main Feb 3, 2026
158 of 161 checks passed
@release-clerk
Copy link
Copy Markdown

release-clerk bot commented Feb 3, 2026

Release Notes Persisted

fixed squirrel.mac stacked update behavior to old staged updates

@trop
Copy link
Copy Markdown
Contributor

trop bot commented Feb 3, 2026

I have automatically backported this PR to "39-x-y", please check out #49637

@trop trop bot added in-flight/39-x-y and removed target/39-x-y PR should also be added to the "39-x-y" branch. labels Feb 3, 2026
@trop
Copy link
Copy Markdown
Contributor

trop bot commented Feb 3, 2026

I have automatically backported this PR to "40-x-y", please check out #49638

@trop
Copy link
Copy Markdown
Contributor

trop bot commented Feb 3, 2026

I have automatically backported this PR to "41-x-y", please check out #49639

@trop trop bot added in-flight/40-x-y in-flight/41-x-y and removed target/40-x-y PR should also be added to the "40-x-y" branch. labels Feb 3, 2026
@trop trop bot added merged/41-x-y PR was merged to the "41-x-y" branch. merged/40-x-y PR was merged to the "40-x-y" branch. merged/39-x-y PR was merged to the "39-x-y" branch. and removed target/41-x-y PR should also be added to the "41-x-y" branch. in-flight/41-x-y in-flight/40-x-y in-flight/39-x-y labels Feb 3, 2026
nikwen added a commit that referenced this pull request Mar 11, 2026
nikwen added a commit that referenced this pull request Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/39-x-y PR was merged to the "39-x-y" branch. merged/40-x-y PR was merged to the "40-x-y" branch. merged/41-x-y PR was merged to the "41-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants