Python: uninstall a ghost package

  import, pip, python

I’ve got a project damastes, which introduced two packages, damastes and procrustes:

>>> import damastes
>>> import procrustes

I removed the procrustes package from the project, without changing the damastes project version, rebuilt and reinstalled the project:

$ poetry build
$ pip install dist/damastes... --user -I

but

>>> import procrustes

is still very much alive. It won’t show on $ pip list, and why should it? It’s part of the damastes package.

Here is the ghost:

$ locate procrustes
/home/user/.local/lib/python3.9/site-packages/procrustes
/home/user/.local/lib/python3.9/site-packages/procrustes/__init__.py
/home/user/.local/lib/python3.9/site-packages/procrustes/__pycache__
/home/user/.local/lib/python3.9/site-packages/procrustes/procrustes.py
/home/user/.local/lib/python3.9/site-packages/procrustes/run.py

Is there a legitimate way to pinpoint and clean it up? Or do I have to remove the procrustes directory manually?

Source: Python Questions

LEAVE A COMMENT