Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

[Bug] `scoop cleanup --all --cache` does not clean all cache

Open wickles opened this issue 1 year ago • 1 comments

Bug Report

Current Behavior

scoop cleanup --all --cache does not clear cached downloads for uninstalled apps from ~/scoop/cache

Expected Behavior

All cached downloads for old versions and uninstalled apps should be be removed.

Additional context/output

Examples of apps with leftover files in the cache:

  • fastcopy 5.3.0 .. 5.7.12
  • git-with-openssh 2.42.0
  • windowsdesktop-runtime-lts 6.0.21 .. 6.0.23
  • mysql 8.3.0
  • grep 3.11
  • oh-my-posh 18.6.0 .. 18.8.1

Also cannot be cleared by specifying the app:

> scoop cleanup --cache mysql
ERROR 'mysql' isn't installed.

Possible Solution

System details

Windows version: 11

OS architecture: 64bit

PowerShell version: 7.4.2

Scoop Configuration

{
  "last_update": "2024-06-22T13:19:28.4880705-07:00",
  "aria2-warning-enabled": false,
  "scoop_branch": "master",
  "scoop_repo": "https://github.com/ScoopInstaller/Scoop"
}

wickles avatar Jun 22 '24 20:06 wickles

cleanup work with installed manifests only.

scoop install app        # 1.0
scoop update app         # 1.5
scoop reset [email protected]
scoop cleanup app --cache
Removing app: 1.5

app --version
1.0

scoop cache app
Name Version Length
app  1.0     12345

HUMORCE avatar Jul 27 '24 08:07 HUMORCE

Note for myself and any other readers: scoop cache rm ... is helpful here.

wickles avatar Nov 10 '24 02:11 wickles