ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
21.22k stars 1.41k forks source link

[Feature] List old versions of all apps #5826

Closed xiaoxstz closed 6 months ago

xiaoxstz commented 8 months ago

Feature Request

Add a command to show all the old versions installed, so we can know what we need to cleanup

Is your feature request related to a problem? Please describe.

I want to cleanup the old versions of the apps. But I don't want to cleanup all, in case the current versions of some apps are unstable.

If I use scoop cleanup *, all the old versions will be cleaned. If not, I don't know what apps have old versions.

Describe the solution you'd like

The command can be scoop cleanup --show , scoop list --old or scoop old

The output can be

Old versions:

Name            OldVersion
----                -------
vscode           1.86.2,1.86.1
alist               3.31.0          

Describe alternatives you've considered

goyalyashpal commented 7 months ago

try scoop cache:

```console $ scoop -h ... cache Show or clear the download cache ... $ scoop cache -h Usage: scoop cache show|rm [app(s)] Scoop caches downloads so you don't need to download the same files when you uninstall and re-install the same version of an app. You can use scoop cache show to see what's in the cache, and scoop cache rm to remove downloads for a specific app. To clear everything in your cache, use: scoop cache rm * You can also use the `-a/--all` switch in place of `*` here $ scoop cache Total: 78 files, 4.0 GB Name Version Length URL ---- ------- ------ --- 7zip 23.01 1933312 https_www.7-zip.org_a_7z2301-x64.msi ... ```

i don't think it allow to keep to specify to "not remove" some particular cache

can you try with scoop cache rm [^(app1)(app2)(...)] where appN are names of apps? to see if it exempts those apps' cache from removal?

xiaoxstz commented 7 months ago

scoop cache command is used to check cache (the folder <scoop_root>/cache), rather than installed versions of apps

goyalyashpal commented 7 months ago

so, u r talking about multiple installations of same app for all apps?

xiaoxstz commented 7 months ago

yes

rashil2000 commented 6 months ago

Try this (in PowerShell):

(scoop list).Name | % { scoop info $_ } | select name, installed | fl *
goyalyashpal commented 5 months ago

i faced the need for this too.

but yeah, thing is scoop cleanup -ak works okay. for scoop root dir, went from 28.9 G -> 22.7 G -> 17.0 G quick and easy (when combined with scoop cache rm -a too)