Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How do I uninstall Python packages that have been built from source and installed via...

python setup.py build
python setup.py install


share|improve this question

3 Answers 3

up vote 5 down vote accepted

If your package provider didn't produce a setup.py uninstall method then, more often than not, you can just manually remove the package from your Python's site-packages directory.

This will be located at /usr/lib/python2.5/site-packages or equivalent for your distro and version of Python. Within that there will be either a directory or a .egg file corresponding to the package's name. Simply delete that.

There are some instances where packages will install stuff elsewhere. Django for instance installs django-admin.py to /usr/sbin. Your best bet is to run setup.py install again, make a note of what it is installing where and then cleanup.

share|improve this answer

You need to delete the folder and files that were created for the package in the site-packages folder of python.

I'm not sure where it is on Ubuntu but it is probably something like:


but it could be in lib64 if you have a 64bit install and the python version might be different so adjust the path accordingly.

share|improve this answer

Building on what everyone has said, if you just installed it ( say within the last 20 minutes), the following might help you find what you need to delete:

find /usr/lib/python* -cmin -20
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.