LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pip-cache

Inspect and manage pip's wheel cache

TLDR

Show cache directory
$ pip cache dir
copy
List cached packages
$ pip cache list
copy
Show cache info
$ pip cache info
copy
Remove specific package from cache
$ pip cache remove [package]
copy
Clear all cache
$ pip cache purge
copy

SYNOPSIS

pip cache command [options]

DESCRIPTION

pip cache manages pip's HTTP-response cache and built-wheel cache. Pip stores downloaded and locally built wheels under a per-user cache directory (e.g. ~/.cache/pip on Linux, ~/Library/Caches/pip on macOS, %LocalAppData%\pip\Cache on Windows) so that subsequent installs of the same version can skip the network round-trip and the build step.To bypass the cache for a single install, use pip install --no-cache-dir pkg; to override the cache location, set the PIP_CACHE_DIR environment variable or pass pip --cache-dir DIR.

PARAMETERS

dir

Print the cache directory path.
info
Show cache size and location.
list [pattern]
List wheels currently in the cache, optionally filtered by glob pattern or package name.
remove pattern
Remove cached wheels matching pattern (glob or package name).
purge
Remove every wheel and HTTP response from the cache.
--format FORMAT
Output format for list: human (default) or abspath (full file paths). Also configurable via PIP_FORMAT.

CAVEATS

pip cache list and remove only operate on the wheel cache, not the HTTP response cache. purge clears both. The HTTP cache uses ETag/Last-Modified validation, so safely removable at any time.

SEE ALSO

pip(1), pip-install(1)

Copied to clipboard
Kai