Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I remove pipenv cache folder? How to safely do it

while using my pipenv virtual environment, I found a huge folder full of cache, I want to know:

  1. Can I delete it?
  2. If yes, how to delete it
  3. What consequences could have deleting it

Route: home/cache/pipenv

Delete

like image 772
The Dan Avatar asked Aug 05 '20 10:08

The Dan


Video Answer


2 Answers

While simply deleting the Cache subfolder works fine, using pipenv lock --clear deletes the cache for your current project only. If you properly want to get rid of all the somewhen collected data, use

pipenv --clear

instead. You'll see Clearing caches ... and the cache folder disappears. According to the documentation it is usually in one of the following locations:

~/Library/Caches/pipenv (macOS)
%LOCALAPPDATA%\pipenv\pipenv\Cache (Windows)
~/.cache/pipenv (other operating systems)
like image 117
Peter Avatar answered Sep 22 '22 15:09

Peter


Caches are meant to be temporary so you can always clear them. With pipenv you can call pipenv lock --clear, or maybe the dirtier way by just deleting the folder. Seems like a lot of people have this issue with bloated pipenv caches. The downside to clearing the cache is that it will take longer for pipenv to download or install packages because it cannot quickly search for previously used versions in the cache folder.

like image 30
Bugbeeb Avatar answered Sep 22 '22 15:09

Bugbeeb