What's the problem this feature will solve?
Pip stores data in its cache, but never clears out obsolete data.
Describe the solution you'd like
Some means (automated or manual) for no-longer-needed cache entries to be cleared out.
Alternative Solutions
It's possible to just delete the cache altogether, as there is nothing in there that won't be recreated as needed, but this is an "all or nothing" solution.
Additional context
Prompted by the discussion here
Related to #3138.
Also related to #4685, since that could be how you perform this.
Is this still relevant as we finally have a pip cache
command with some useful options like purge
, remove
etc?
I think, given pip cache
as it is and #7372 (having it handle more than wheels), I think the main thing left for this issue is the possibility of having _automatic_ cache cleanup. Is that correct, @pfmoore, or do you have other ideas?
Agreed, and as discussed in #8474, I'm ambivalent at best over the idea of an automatic cleanup. So I'm going to close this as complete, and leave automatic cleanup as something for someone else to raise if they feel like it.
Thanks for your work in making this happen @duckinator!
Reopening, as I realised via this discussion that this issue was originally triggered by the question of tidying up outdated selfcheck files.
IMO we still need an automated solution for clearing up obsolete selfcheck files. I'd expect that to be something along the lines of whenever we do a selfcheck, we check all the other selfcheck files and delete any that refer to directories that no longer exist. I don't think it should be down to the user to run a purge, nor do I think we should leave files for non-existent environments indefinitely.
(@pfmoore you forgot to click "re-open")
Bah. Long day. Thanks for letting me know!