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

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

## Root Cause

The pip installation fails because the disk partition where pip's cache or site-packages resides has run out of free space. This commonly happens when /tmp or the root filesystem is full.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   pip cache purge && sudo apt-get clean && rm -rf /tmp/*
   ```
2. **** (85% success)
   ```
   pip install --target=/mnt/bigdisk/python-packages package_name
   ```
3. **** (80% success)
   ```
   export TMPDIR=/mnt/bigdisk/tmp && pip install package_name
   ```

## Dead Ends

- **** — Disabling cache does not free existing filesystem space and may still require temporary space for wheel building. (70% fail)
- **** — Timeout is unrelated to disk space; the error persists. (90% fail)
- **** — Elevated privileges do not create disk space and may write to a different partition but still fail. (80% fail)
