What pip Could Not Find
pip cannot uninstall a package because it cannot find the installed-files manifest (RECORD) in the package metadata.
Check the exact package name, version, and source
Confirm whether the package was installed by your OS package manager (the error often hints "installed by debian" / "installed by rpm").
Check which environment you're modifying (system Python vs venv).
List package location:python -m pip show <pkg>
Confirm the exact package you asked for
If the package is owned by the OS, uninstall it using the OS package manager instead of pip.
If it is not system-owned, try reinstalling the exact version with --force-reinstall --no-deps, then uninstall again.
Prefer using a venv for project dependencies so uninstall operations are fully pip-managed.
Why It Was Not Found
Usually this comes down to the package was installed by a distro package manager that doesn't provide pip uninstall metadata, the package's dist-info metadata was partially removed or corrupted, or you're trying to uninstall a package outside the active environment/prefix.
Prove the Source Resolves Correctly Now
Re-run python -m pip uninstall <pkg> and confirm it completes, and run python -m pip show <pkg> and confirm it's no longer installed.
Typical Output
ERROR: Cannot uninstall pip 24.0, RECORD file not found. Hint: The package was installed by debian.
ERROR: Cannot uninstall foobar 0.1, RECORD file not found. You might be able to recover from this via: 'pip install --force-reinstall --no-deps foobar==0.1'. Why pip needs RECORD to uninstall
pip uninstalls packages by reading the list of installed files from metadata (typically dist-info/RECORD). If that metadata isn't present (or doesn't include RECORD), pip cannot safely remove files and refuses. This often happens when the OS package manager installed the package, or metadata was deleted/corrupted.
Avoid Version and Source Drift
To prevent this, avoid using pip to manage packages in system Python on distro-managed systems, use virtual environments for projects, and avoid deleting dist-info directories manually, use pip uninstall instead.
Docs and source code
github.com/pypa/pip/blob/25.3/src/pip/_internal/exceptions.py
pip raises this diagnostic when it can't find a package's installed-files manifest (dist-info/RECORD), and it changes the hint depending on whether the package appears to have been installed by pip or by another installer. - GitHub
class UninstallMissingRecord(DiagnosticPipError):
reference = "uninstall-no-record-file"
def __init__(self, *, distribution: BaseDistribution) -> None:
installer = distribution.installer
if not installer or installer == "pip":
dep = f"{distribution.raw_name}=={distribution.version}"
hint = Text.assemble(
"You might be able to recover from this via: ",
(f"pip install --force-reinstall --no-deps {dep}", "green"),
)
else:
hint = Text(
f"The package was installed by {installer}. "
"You should check if it can uninstall the package."
)
super().__init__(
message=Text(f"Cannot uninstall {distribution}"),
context=(
"The package's contents are unknown: "
f"no RECORD file was found for {distribution.raw_name}."
),
hint_stmt=hint,
)