pip cache purge: Clear pip’s Wheel Cache
Wipe pip’s cache to reclaim disk or force fresh downloads.
pip cache purge removes everything from pip’s local cache. It is handy on a runner that is out of disk or when you suspect a corrupted cached wheel.
What it does
Deletes all wheels and HTTP responses pip has cached. Related subcommands inspect the cache: "pip cache dir", "pip cache info", and "pip cache list".
Common usage
Terminal
pip cache purge
pip cache info
pip cache dir
pip cache remove "numpy*"Common CI use: reclaim disk
When a job fails with "No space left on device" mid-install, the pip cache may be the culprit on a reused runner. Purge it, then retry the install.
Terminal
# Reclaim disk then retry:
pip cache purge
pip install -r requirements.txtRelated guides
pip install --no-cache-dir: Disable the pip CacheWhen to use pip install --no-cache-dir - smaller Docker images and avoiding stale cached wheels - plus the tr…
Docker "no space left on device" - Causes and FixesWhy Docker builds fail with "no space left on device" in CI, and how to reclaim space, prune layers, and stop…
pip config: Manage pip Settings in CIHow pip config sets, lists, and edits pip settings like index URLs and timeouts, where the config files live,…