Pipenv unlimited cache size
See original GitHub issueIssue description
Huge cache size (at ~/.cache/pipenv)
Expected result
Cache to contain only the most recently used packages.
Actual result
Cache seems to keep growing in size with no restrictions (16 GB), while Pip cache on the other hand is < 2GB
Steps to replicate
du -ah ~/.cache/pipenv --max-depth=1 | sort -hr 16G /home/pc/.cache/pipenv/http 16G /home/pc/.cache/pipenv 185M /home/pc/.cache/pipenv/wheels 74M /home/pc/.cache/pipenv/hash-cache 12M /home/pc/.cache/pipenv/pkgs 16K /home/pc/.cache/pipenv/selfcheck.json 16K /home/pc/.cache/pipenv/depcache-py3.6.json 16K /home/pc/.cache/pipenv/depcache-py3.5.json 12K /home/pc/.cache/pipenv/depcache-py3.7.json
du -ah ~/.cache/pip --max-depth=1 | sort -hr 1.9G /home/pc/.cache/pip 1.8G /home/pc/.cache/pip/http 124M /home/pc/.cache/pip/wheels 16K /home/pc/.cache/pip/selfcheck.json
$ pipenv --support
Pipenv version: '2018.11.26'
Pipenv location: '/home/pc/.local/lib/python3.6/site-packages/pipenv'
Python location: '/usr/bin/python3.6'
Python installations found:
3.7.0:/usr/local/bin/python3.7m3.7.0:/usr/local/bin/python3.73.6.6:/usr/bin/python3.6m3.6.6:/usr/bin/python3.63.5.2:/usr/bin/python3.5m3.5.2:/usr/bin/python3.52.7.12:/usr/bin/python2.72.5.6:/usr/bin/python2.5
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.6',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '4.15.0-46-generic',
'platform_system': 'Linux',
'platform_version': '#49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019',
'python_full_version': '3.6.6',
'python_version': '3.6',
'sys_platform': 'linux'}
System environment variables:
XDG_SEATXDG_SESSION_IDDISPLAYUPSTART_JOBJOBCOLORTERMGNOME_KEYRING_CONTROLGNOME_DESKTOP_SESSION_IDDEFAULTS_PATHQT_QPA_PLATFORMTHEMELOGNAMEINSTANCEJAVA_HOMESHELLPATHIM_CONFIG_PHASEQT4_IM_MODULECLUTTER_IM_MODULEXMODIFIERSXDG_SESSION_PATHJ2REDIRSSH_AUTH_SOCKUPSTART_EVENTSXDG_SESSION_DESKTOPGDMSESSIONXAUTHORITYQT_IM_MODULEXDG_CONFIG_DIRSMANDATORY_PATHUPSTART_SESSIONDESKTOP_SESSIONXDG_RUNTIME_DIRGTK_IM_MODULEIBUS_DISABLE_SNOOPERGTK_MODULESPWDUSERDERBY_HOMEUPSTART_INSTANCETERMINATOR_UUIDHOMEQT_ACCESSIBILITYORBIT_SOCKETDIRXDG_SEAT_PATHXDG_DATA_DIRSLANGUAGECOMPIZ_CONFIG_PROFILEXDG_GREETER_DATA_DIRLANGGTK2_MODULESGPG_AGENT_INFOSHLVLWINDOWIDJ2SDKDIRXDG_VTNRGDM_LANGSESSIONTYPEDBUS_SESSION_BUS_ADDRESSXDG_CURRENT_DESKTOPXDG_SESSION_TYPEGNOME_KEYRING_PIDQT_LINUX_ACCESSIBILITY_ALWAYS_ONTERMOLDPWDZSHPAGERLESSLSCOLORSLS_COLORSLC_CTYPEANDROID_HOME_PIP_DISABLE_PIP_VERSION_CHECKPYTHONDONTWRITEBYTECODEPIP_SHIMS_BASE_MODULEPIP_PYTHON_PATHPYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH:/home/pc/bin:/home/pc/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/pc/Android/Sdk/platform-tools:/home/pc/Android/Sdk/tools:/home/pc/Android/Sdk/build-tools/23.0.2/:/home/pc/Downloads/android-sdk-linux/platform-tools:/home/pc/Downloads/android-sdk-linux/toolsSHELL:/usr/bin/zshLANG:en_US.UTF-8PWD:/home/pc
Issue Analytics
- State:
- Created 4 years ago
- Reactions:34
- Comments:12 (2 by maintainers)

Top Related StackOverflow Question
@uranusjr Why would this be a low priority enhancement? I’m new to Python here and I decided to use pipenv. Next day my hard drive was gone with 15GB of it occupied by these cache files.
If this is not going to be fixed any time soon, then a warning on the top of the README file ought to be placed.
I use these three lines as a replacement for pipenv using pip-tools
create virtual environment
python -m venv venv && source venv/bin/activate
pin requirements
pip-compile requirements.in --generate-hashes
install pinned requirements
pip install -r requirements.txt
Project seems to be dead, Why this project is recomended at https://packaging.python.org/guides/tool-recommendations/ is truely beyond me!