04Aug Uninstalling a Python setup.py style project
If you are like me and like to install the newest versions of software and not just settle for the ones available from a package manager, you may have some trouble if you get to a point where you want to uninstall it if that project uses python’s setuptools or disttools for installation.
Using setup.py is wonderful for installing but there is no uninstall option available…pretty sad. I saw that there were options for creating an RPM or Windows installer package from the source but no way to create a .deb for Debian/Ubuntu. So, if you are using an RPM based distro then all you will need is the bdist_rpm command and then install the resulting RPM file.
If you are running Debian or Ubuntu then just do this:
python setup.py bdist_rpm
cd dist
sudo alien -d -c {your_package}.rpm # Make sure you don't use the src RPM
sudo dpkg -i {your_package}.deb
That’s it, now you have installed the package. I haven’t tested this extensively so I don’t know if there are problems because the setup.py file isn’t run with the install parameter so some things may not be configured right, but it should work for the most part.
Also, I have not had much luck with it but you may also want to try out stdeb http://github.com/astraw/stdeb/tree/master

