Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] cleanup cannot delete old version #4663

Closed
zhangchaoza opened this issue Jan 16, 2022 · 2 comments
Closed

[Bug] cleanup cannot delete old version #4663

zhangchaoza opened this issue Jan 16, 2022 · 2 comments
Labels

Comments

@zhangchaoza
Copy link

Bug Report

Current Behavior

After scoop cleanup *, there were nothing cleaned up.

$ scoop cleanup *
Everything is shiny now!

Expected Behavior

Should clear old version, such like

Removing pe-bear: _0.5.5.2.old

I found all the directories like "_$version.old" cannot be deleted.

Possible Solution

I changed function Get-InstalledVersion in lib\versions.ps1

return $versions | Where-Object { ($_ -ne 'current') -or ($_ -like '_*.old*') }

System details

Windows version: 10

OS architecture: 64bit

PowerShell version: 7.2.1

Additional software: [(optional)
Current Scoop version:
5602083 (HEAD -> master, tag: 2021-12-26, origin/master, origin/HEAD) fix(schema): Add 'license' definition (#4596)

@rashil2000
Copy link
Member

@niheaven looks like this was added in #3721. Any reason for excluding *.old folders?

@niheaven
Copy link
Member

niheaven commented Jan 17, 2022

It's not a bug of Get-InstalledVersion, it's a bug of scoop-cleanup, I'll fix it soon.

Emm, it should be fixed by add a new switch to Get-InstalledVersion...

Since _xxx.old is unused, so it is excluded from installed version, but if we want to clean up, it must be listed.

@rasa rasa changed the title [Bug] clearup cannot delete old version [Bug] cleanup cannot delete old version Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants