Is it safe to delete ~/.cache/pip directory

According to pip’s caching documentation from version 6 you can use the –no-cache-dir option.

But that didn’t help me as I was using a wrapper (pinax starter projects) that runs pip in the background to install several packages. Since I kept getting an pip.exceptions.HashErrors (‘hashes don’t match the requirement file) and I didn’t want to temper with its code I renamed the pip cache folder and tried running my wrapper again. Once I noticed there weren’t issues I proceeded to delete the entire cache pip folder. I haven’t had any problem after that. So I can assume it is entirely a safe operation to delete pip’s cache folder.

These are the locations where you can find your pip cache:

Unix

~/.cache/pip and it respects the XDG_CACHE_HOME directory.

OS X

~/Library/Caches/pip.

Windows

\pip\Cache

Leave a Comment