- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.2k
Description
What's the problem this feature will solve?
#4685 says:
pip's cache is currently a black box that the users can't really inspect. This is not the nicest of experiences. Adding a pip cache to allow interacting with the cache (much like the new pip config) would be a good way to fix that.
Currently git cache purge in #6391 only removes the *.whl files from the pip/wheels/ directory.
This leaves:
- a lot of empty directories under pip/wheels/(eg. 1,608 dirs, 57 KB)
- a lot of files under pip/http/(eg. 2,408 files, 6,850 dirs, 2.1 GB)
- a selfcheck.jsonandpip/selfcheck/directory (eg. 45 files, 27 KB)
Should they also be cleaned up?
pip cache --help says `purge will "Remove all items from the cache", but it doesn't.
Split out from #6391 (comment) for follow-up after #6391 is merged.
Describe the solution you'd like
- 
Should pip cache purgeremove thepip/wheels/directory itself so all the subdirs are also cleaned up? In my case, it's only 57 KB afterwards, but I guess I don't need those at all, and there's potential for them to slow down the computer.
- 
And I also still have a 2.1 GB pip/http/directory after purge. Should that also be removed?
- 
And selfcheck.jsonandpip/selfcheck/are only 27 KB, but shouldpurgeremove the wholepip/cache dir?
I think my  [typo, cannot remember original]pip/wheels/ directory was quite small, especially when compared with pip/wheels/.
Alternative Solutions
- 
Leave the files and directories as is, to accumulate. 
- 
Feature request Cross-platform command to return pip's cache directory #7350 would allow the user to find out where the cache directory is, and writing their own commands to delete files and directories. It'd be nicer for this to be built into pip cache purge.