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

pip cache purge show freed space #12176

Closed
1 task done
janosh opened this issue Jul 22, 2023 · 2 comments · Fixed by #13108
Closed
1 task done

pip cache purge show freed space #12176

janosh opened this issue Jul 22, 2023 · 2 comments · Fixed by #13108
Labels
C: cache Dealing with cache and files in it resolution: deferred till PR Further discussion will happen when a PR is made type: enhancement Improvements to functionality

Comments

@janosh
Copy link

janosh commented Jul 22, 2023

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

@janosh janosh added S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature labels Jul 22, 2023
@notatallshaw
Copy link
Member

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.

@ichard26 ichard26 added type: enhancement Improvements to functionality resolution: deferred till PR Further discussion will happen when a PR is made help wanted For requesting inputs from other members of the community C: cache Dealing with cache and files in it and removed type: feature request Request for a new feature S: needs triage Issues/PRs that need to be triaged help wanted For requesting inputs from other members of the community labels May 7, 2024
@ichard26
Copy link
Member

ichard26 commented May 7, 2024

PRs would be welcomed, indeed.

@ichard26 ichard26 removed the help wanted For requesting inputs from other members of the community label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: cache Dealing with cache and files in it resolution: deferred till PR Further discussion will happen when a PR is made type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants