Skip to content

[BUG] "Enable Scoop cleanup on launch" only clears the download cache, but fails to remove previous app versions #5142

Description

@BitsAstro

Please confirm these before moving forward

  • I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
  • I have tested that this issue has not been fixed in the latest (beta or stable) release.
  • I have checked the FAQ section for solutions.
  • This issue is about a bug (if it is not, please use the correct template).

UniGetUI Version

2026.2.5

Windows version, edition, and architecture

Windows 11 Pro 26200.8655

Describe your issue

There seems to be an inconsistency or bug in how the startup option "Enable Scoop cleanup on launch" is implemented.
When this option is enabled, it successfully clears the download cache in ~/scoop/cache, but it fails to clean up previous versions of installed software (leaving older app directories intact in ~/scoop/apps).
However, when manually clicking the "Run cleanup and clear cache" button under Scoop settings, it successfully removes those older app versions.
It appears that the startup "cleanup" option might either be executing the wrong command (e.g., executing scoop cache rm instead of scoop cleanup), or the scoop cleanup execution on startup is failing silently.

Steps to reproduce the issue

  1. Enable "Enable Scoop cleanup on launch" in UniGetUI settings.
  2. Update some Scoop packages so that older version directories are created in ~/scoop/apps/<app_name>/.
  3. Restart UniGetUI to let the startup cleanup run automatically.
  4. Check the Scoop folders: The download cache is cleared, but the older version directories are still there.
  5. Go to UniGetUI settings and click "Run cleanup and clear cache" manually.
  6. Check again: Now the older version directories are successfully removed.

UniGetUI Log

[2026/7/18 22:58:27]    __  __      _ ______     __  __  ______
                       / / / /___  (_) ____/__  / /_/ / / /  _/
                      / / / / __ \/ / / __/ _ \/ __/ / / // /
                     / /_/ / / / / / /_/ /  __/ /_/ /_/ // /
                     \____/_/ /_/_/\____/\___/\__/\____/___/
                         Welcome to UniGetUI Version 2026.2.5
[2026/7/18 22:58:27]   
[2026/7/18 22:58:27] Build 107
[2026/7/18 22:58:27] UI Framework: Avalonia
[2026/7/18 22:58:27] Data directory C:\Users\A\AppData\Local\UniGetUI
[2026/7/18 22:58:27] OS: Microsoft Windows 10.0.26200
[2026/7/18 22:58:27] Process arch: X64 (OS: X64)
[2026/7/18 22:58:27] Runtime: .NET 10.0.10
[2026/7/18 22:58:27] Elevated: False
[2026/7/18 22:58:27] Packaged (MSIX): False
[2026/7/18 22:58:27] Args: (none)
[2026/7/18 22:58:27] Command cargo-binstall.exe was not found on the system
[2026/7/18 22:58:28] Unable to retrieve secret for resource 'UniGetUI/GitHubAccessToken': Cannot find an element or item.
                     
                     
[2026/7/18 22:58:28] Unable to retrieve secret for resource 'UniGetUI/GitHubAccessToken': Cannot find an element or item.
                     
                     
[2026/7/18 22:58:28] PowerShell is not enabled
[2026/7/18 22:58:28] Command dotnet.exe was not found on the system
[2026/7/18 22:58:28] Command vcpkg.exe was not found on the system
[2026/7/18 22:58:28] Command cargo.exe was not found on the system
[2026/7/18 22:58:28] Command bun.exe was not found on the system
[2026/7/18 22:58:28] .NET Tool is enabled but was not found on the system!
[2026/7/18 22:58:28] PowerShell7 is enabled and was found on C:\Users\A\AppData\Local\Microsoft\WindowsApps\pwsh.exe
[2026/7/18 22:58:28] Cargo is enabled but was not found on the system!
[2026/7/18 22:58:28] Command bun.cmd was not found on the system
[2026/7/18 22:58:28] Bun is enabled but was not found on the system!
[2026/7/18 22:58:28] Npm is enabled and was found on C:\Windows\system32\windowspowershell\v1.0\powershell.exe
[2026/7/18 22:58:28] Command choco.exe was not found on the system
[2026/7/18 22:58:28] Chocolatey is enabled but was not found on the system!
[2026/7/18 22:58:28] Pip is enabled and was found on C:\Users\A\AppData\Local\Microsoft\WindowsApps\python.EXE
[2026/7/18 22:58:28] Command vcpkg was not found on the system
[2026/7/18 22:58:28] Scoop is enabled and was found on C:\Users\A\AppData\Local\Microsoft\WindowsApps\pwsh.exe
[2026/7/18 22:58:28] Command vcpkg was not found on the system
[2026/7/18 22:58:28] Vcpkg root was not found. Please define the %VCPKG_ROOT% environment variable or define it from UniGetUI Settings
[2026/7/18 22:58:28] vcpkg is enabled but was not found on the system!
[2026/7/18 22:58:28] Winget is enabled and was found on C:\Users\A\AppData\Local\Microsoft\WindowsApps\winget.exe
[2026/7/18 22:58:28] An error occurred while initialising package manager Pip
[2026/7/18 22:58:28] System.InvalidOperationException: Microsoft Store python alias is not a valid python install
                        at UniGetUI.PackageEngine.Managers.PipManager.Pip._loadManagerVersion(String&) + 0x14c
                        at UniGetUI.PackageEngine.ManagerClasses.Manager.PackageManager.Initialize() + 0xd7
[2026/7/18 22:58:30] Integrity check passed successfully!
[2026/7/18 22:58:34] Could not resolve installer hosts for Futuremark.FuturemarkSystemInfo version 5.84.1372.0: Failed during source operation 'manifest' for 'winget': Version '5.84.1372.0' was not found for package 'Futuremark.FuturemarkSystemInfo' in source 'winget'.

Package Managers Logs

Manager WinGet with version:
System WinGet (CLI) Version: v1.29.280
Using Native WinGet helper (COM Api)
Activation mode: packaged COM registration
Activation source: system COM registration

——————————————————————————————————————————

Logged native task on manager Winget. Task type is ListSources
Process start time: 2026/7/18 22:58:28
Process end time:   2026/7/18 22:58:28

-- Task information
 ...

The task reported success

——————————————————————————————————————————
Logged subprocess-based task on manager Winget. Task type is RefreshIndexes
Subprocess executable: "C:\Users\A\AppData\Local\Microsoft\WindowsApps\winget.exe"
Command-line arguments: " source update --disable-interactivity --proxy 127.0.0.1:7881"
Process start time: 2026/7/18 22:58:30
Process end time:   2026/7/18 22:58:30

-- Process STDOUT
 ...

Return code: FAILED (0x8A150002, 2316632066, -1978335230)

——————————————————————————————————————————
Logged native task on manager Winget. Task type is ListInstalledPackages
Process start time: 2026/7/18 22:58:30
Process end time:   2026/7/18 22:58:34

-- Task information
 ...

The task reported success

——————————————————————————————————————————
Logged native task on manager Winget. Task type is OtherTask
Process start time: 2026/7/18 22:58:30
Process end time:   2026/7/18 22:58:34

-- Task information
 ...

The task reported success

——————————————————————————————————————————
Logged native task on manager Winget. Task type is ListUpdates
Process start time: 2026/7/18 22:58:30
Process end time:   2026/7/18 22:58:34

-- Task information
 ...

The task reported success

——————————————————————————————————————————

Relevant information

Expected behavior:Enable Scoop cleanup on launch" should perform a proper cleanup of previous software versions (using scoop cleanup), just like the manual button does.
Additional context:If this failure to remove old versions on startup is due to background permission/UAC issues, UniGetUI should handle it gracefully, or at least ensure user-level packages are cleaned up successfully.

Screenshots and videos

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions