You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 *.whlfiles 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.json and pip/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.
Should pip cache purge remove the pip/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.json and pip/selfcheck/ are only 27 KB, but should purge remove the whole pip/ cache dir?
I think my pip/wheels/ directory was quite small, especially when compared with pip/wheels/. [typo, cannot remember original]
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.
What's the problem this feature will solve?
#4685 says:
Currently
git cache purgein #6391 only removes the*.whlfiles from thepip/wheels/directory.This leaves:
pip/wheels/(eg. 1,608 dirs, 57 KB)pip/http/(eg. 2,408 files, 6,850 dirs, 2.1 GB)selfcheck.jsonandpip/selfcheck/directory (eg. 45 files, 27 KB)Should they also be cleaned up?
pip cache --helpsays `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 withpip/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.