pip
pip copied to clipboard
`pip cache purge` show freed space
What's the problem this feature will solve?
Current report
Files removed: 364
is a bit meaningless.
Describe the solution you'd like
Much more interesting to see how much disk space was freed.
Alternative Solutions
Get cache dir location first and run du -sh
on it before and after.
Additional context
I think freed disk space should be added to the default report, not hidden behind e.g. a verbose flag.
Code of Conduct
- [X] I agree to follow the PSF Code of Conduct.
FYI, having written disk space utilities in Python one of the issues is the size of the files cleared is not the disk space usage, in fact depending how the file system and OS are setup you might be removing no space from the disk.
And Pip can't invoke a tool like du as it's not portable.
That said other tools get around this by just saying "x {size unit} of files removed".
I'm not a Pip maintainer but I'm sure a PR would be welcomed for something like this.
PRs would be welcomed, indeed.