What a Python setup actually weighs
Every pip install that downloads a wheel leaves it in %LOCALAPPDATA%\pip\cache, so the next install skips the download. That is sound engineering and an unbounded promise: nothing ever removes a wheel, so the folder only grows, a gigabyte at a time, for years.
Virtual environments are the bigger half. A fresh venv weighs 15–30 MB, but a data-science stack with numpy and pandas passes half a gigabyte, and a CUDA build of PyTorch sails past five. Ten abandoned project folders later, you are looking at the price of a second drive.
The safe diet, in order
Nothing below touches your code or your global interpreter. Work through the list from the top and stop the moment disk pressure is gone.
- pip cache dir prints the cache location; pip cache info reports its size and file count
- pip cache purge empties the wheel cache — installs will re-download, nothing else changes
- Audit your projects for .venv and venv folders you have not opened in months; a disk usage tool finds them fastest
- Before deleting a venv, run pip freeze > requirements.txt inside it, then delete the whole folder
- If you used pipenv years ago, %USERPROFILE%\.virtualenvs may still be holding its environments
- Recreate any venv later with python -m venv .venv and pip install -r requirements.txt
What not to do
Do not delete packages out of the global interpreter's site-packages by hand — half of your tooling may depend on what lives there. Do not disable the cache out of spite either: it exists to save re-downloads, and a quarterly purge gives you the space without the waiting. And if a project still matters, keep its venv until you have exported the freeze and checked it into the repository.
Questions and Answers
Where is the pip cache on Windows?
In %LOCALAPPDATA%\pip\cache. The command pip cache dir prints the exact path, and pip cache info reports the size.
Is it safe to delete a virtualenv folder?
Yes, once you have exported its packages with pip freeze into a requirements file. Recreating it later is one command, and your code in the folder is untouched.
Know what is included before you buy.
The one-time 30-minute trial covers core tools. PRO-labelled features stay locked until a paid license is activated.
Read next
Write to us: [email protected]