# ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device

- **ID:** `python/pip-no-space-left-on-device`
- **Domain:** python
- **Category:** system_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The filesystem hosting the pip cache or the target site-packages has run out of space, often after many wheel downloads accumulate in ~/.cache/pip.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   pip cache purge
# or manually
rm -rf ~/.cache/pip
df -h ~
pip install somepkg
   ```
2. **** (90% success)
   ```
   export PIP_CACHE_DIR=/mnt/bigdisk/pip-cache
pip install somepkg
# or persist it
pip config set global.cache-dir /mnt/bigdisk/pip-cache
   ```

## Dead Ends

- **** — Avoids new cache writes but the target site-packages still needs space and may be on the same full volume. (70% fail)
- **** — Upgrading pip itself needs space and does not free any. (90% fail)
