setup.py uninstall

Contents

Unix-like

Install over the existing installation with the same sources, recording installed files, then delete them.

sudo python setup.py install --record files.txt
# inspect files.txt to make sure it looks ok. Then in bash:
tr '\n' '\0' < files.txt | xargs -0 sudo rm -f --

Windows

Install on top of the existing installation with a windows installer, then add-remove programs to uninstall.

python setup.py bdist_wininst
dist/foo-1.0.win32.exe

Use other methods which fully support uninstall when available

Uninstalling setup.py install has some inherent problems, which usually aren't a problem:

Alternatives

This page is also at stackoverflow answer.

TODO: contribute this under https://wiki.python.org/moin/Distutils/Cookbook.