Open przemoc opened 1 year ago
Hi, would you like to work on this feature? It should be simple enough.
I know nothing about PowerShell, but yes, I may try to implement this enhancement.
Quickly looking at it (i.e. required operation, not scoop source code yet) seems that the simplest way to get free space for given path, so that it could properly support volumes mounted in folders (junctions to \\?\Volume{...}\
), is using Get-Volume -FilePath
, e.g.
PS> (Get-Volume -FilePath "C:\Users\przemoc\scoop\apps").SizeRemaining
40360910848
To avoid checking space usage by each removed version and summing it up, my idea is to get .SizeRemaining
at the beginning and at the end of scoop cleanup
, and add message at the end Disk space saved during cleanup: xxx
. Why not Deleted: xxx
as originally suggested? Because there could be something else running in Windows that could change .SizeRemaining
in-between, so we do not want to claim that it's scoop who deleted everything.
Does this approach sound acceptable?
Hey, sorry for the delayed response, somehow this thread got buried in the huge mess of GitHub notifications.
The approach sounds good to me!
Thanks, @rashil2000, for responding, and sorry for late reply from my side too. I hope I'll attempt working on this feature by end of the month.
Sure!
Feature Request
Is your feature request related to a problem? Please describe.
scoop cleanup
does not show how much space was freed after running it.scoop cache rm
does that.Example:
If someone does not do
scoop cleanup -a
routinely, then savings can be enormous, bigger thanscoop cache rm -a
. Seeing numbers can make users more aware of that.Describe the solution you'd like
After running
scoop cleanup
display:(Showing number of deleted files is less useful in this case and would needlessly require traversal of outdated package versions to count number of files.)
Describe alternatives you've considered
Manually checking space before and after running given command.
scoop cache rm
does not need that, soscoop cleanup
could be also improved.