# ERROR: Cannot uninstall 'package'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

- **ID:** `python/pip-uninstall-script-not-found`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The package was installed via distutils (e.g., apt, system Python, or an old setup.py install) without a RECORD file, so pip cannot enumerate its files for safe removal.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   Remove via the distro package manager: sudo apt remove python3-package
   ```
2. **** (75% success)
   ```
   List files and remove them: pip show -f package && rm -rf $(pip show -f package | awk '/Location:/{print $2}')/package*
   ```
3. **** (92% success)
   ```
   Create a fresh venv and reinstall the correct version: python -m venv .venv && . .venv/bin/activate && pip install package
   ```

## Dead Ends

- **** — -y skips the confirmation prompt but does not bypass the distutils detection. (90% fail)
- **** — Force-reinstall may leave the old distutils files in place, causing version conflicts. (70% fail)
- **** — Manual deletion misses .dist-info, .pth, and console scripts, leaving a broken environment. (80% fail)
