How do I manually uninstall setuptools (installed by egg)?

Nick Craig-Wood nick at
Thu Dec 11 14:30:53 CET 2008

David Cournapeau <cournape at> wrote:
>  On Wed, Dec 10, 2008 at 12:04 PM, Chris Rebert <clp at> wrote:
> > On Tue, Dec 9, 2008 at 6:49 PM,  <excord80 at> wrote:
> >> On Ubuntu, I accidentally manually installed setuptools
> >> (by running the .egg file
> >> as a shell script via sudo), and now realize I should just be using
> >> apt to take care of my system Python packages.
> >
> > Really, why? setuptools has more Python packages/programs available
> > and updates faster than Debian.
> > It's also likely that some of the Debian Python packages are installed
> > using setuptools anyway.
> > So, why do you think apt and not setuptools is The Right Way(tm)?
>  Setuptools is certainly not the right way to install packages
>  system-wide on debian, it is very likely to break the whole thing.

It wouldn't be too difficult to make a .deb target which would collect
all the files that did get installed into a package.  It would be a
rather rough and ready package but would do the job.

The .deb would then be uninstallable in the usual (dpkg --purge) way.

Did anyone think about that?

There is a bdist_rpm target for distutils which I often use then use
alien to turn into a .deb.  easy_install is a lot easier though!

>  dpkg is a real package installer, with uninstallation feature, correct
>  dependency handling: if you start installing things with setuptools
>  there, dpkg cannot know anymore how to manage your system.


> That's why it is generally a very bad idea to install things which
> are not managed by dpkg in /usr - be it python or something else
> BTW. It is a much better practice to install from source into
> /usr/local, or your $HOME, etc... Anywhere which is not /usr.

easy_install can do that I think...

I find it odd that easy_install doesn't have
 a) a list what you installed with easy_install
 b) uninstall
in an otherwise excellent program.

Nick Craig-Wood <nick at> --

More information about the Python-list mailing list