brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: pip cache dir, info and purge manage the pip download cache

Cache
~/tips/tip-cache-pip-cache-info-purge

pip cache dir

Shows the size of pip's local cache and clears it when it gets too big.

A virtualenv that suddenly takes two gigabytes often hides in a cache directory nobody looks at.

pip cache dir
pip cache info
pip cache purge

pip cache dir prints the location, pip cache info shows its size and the number of wheels, and pip cache purge deletes everything. pip cache list names the stored wheels and takes a pattern. The cache holds built wheels and HTTP responses, so the next install of a large package like numpy has to download or compile it again. In a Dockerfile, pip install --no-cache-dir keeps the image smaller. These subcommands need pip 20.1 or newer.

Further reading: pip documentation: pip cache

Going deeper: Guide: your Unraid cache is full and Docker stopped, how to find out why and fix it

More Cache tips fincore /var/lib/example/data.db npm cache verify fc-cache -f -v ~/.local/share/fonts proxy_cache app; Cache-Control: no-cache All Cache tips (24) All topics

Link