python – How to delete temporary archives downloaded by pip?


I work in Ubuntu 14. I tried to install matplotlib with a command like pip install matplotlib, it could not compile (logically, I later found out that this pip goes to python 2.7, and python3 needs pip3). During installation, pip downloaded an archive from which it then unpacked matplotlib, and I'm not sure if it deletes this temporary archive after unpacking. I climbed into the help, I did not find something useful. Is it possible to force pip to delete the temporary files it has downloaded?


pip doesn't have such a feature as far as I know. It can be done like this:

  1. Delete the .pip/cache folder
  2. You can ignore installed packages – –ignore-installed
  3. Recent versions of pip (c 6 I think) have an option –no-cache-dir
Scroll to Top