Join the waitlistJoin
← All cleanup guides
pip

pip cache: is it safe to delete?

Packages that pip downloaded or built, kept on macOS to speed up later installs.

Where it lives
  • ~/Library/Caches/pip
Risk
Low risk. The tool rebuilds it when needed, so SPACE256 preselects it in Review.
Comes back on its own
Yes
If you delete it
The next pip install downloads its packages again and builds them where needed.
What SPACE256 does
Runs the tool's own cleanup command, only after the tool reports this exact folder, after you confirm in Review with a press and hold.

Cleaned with the tool's own commandpython3 -m pip cache purge

What it is

pip keeps the packages it downloads, and wheels it builds from source, in ~/Library/Caches/pip, so later installs of the same versions are fast. pip cache dir prints the folder and pip cache info shows how much it holds.

Why it grows

Every virtual environment and every project that installs packages adds to the cache, and packages built from source (for example scientific libraries) can be large.

When to clear it

When you need space and can download packages again.

When to keep it

If you rebuild environments often, especially with packages that compile from source, the cache saves time on each rebuild.

How SPACE256 clears it

SPACE256 runs pip’s own python3 -m pip cache purge, only after pip reports this exact folder as its cache.

Questions

Does purging pip's cache remove installed packages?

No. Installed packages stay in their environments. The cache only speeds up the next install of the same package.

Which Python does the command use?

SPACE256 runs `python3 -m pip cache purge` and checks first that pip reports this exact folder as its cache.

Get SPACE256 at launch