How does one remove applications installed through "python setup.py install"?

35,776

Solution 1

Martin v. Löwis answered this here:

"You need to remove all files manually, and also undo any other stuff that installation did manually.

If you don't know the list of all files, you can reinstall it with the --record option, and take a look at the list this produces."

examples:

python setup.py install --record files.txt to generate the list

cat files.txt | xargs rm -rf to remove the files recorded by the previous step.

Solution 2

You should always install Python apps with "pip". pip supports uninstall option.

Share:
35,776

Related videos on Youtube

Orbiter
Author by

Orbiter

Updated on September 18, 2022

Comments

  • Orbiter
    Orbiter almost 2 years

    I have two applications that I attempted to install, but they didn't work and now I can't get rid of them. They were both installed through sudo python setup.py install so there aren't any actual package files that I can remove from Synaptic/Software center. Niether of the README files say anything about uninstalling and trying sudo python setup.py uninstall (as someone suggested) didn't work. Is there another way to get rid of these applications?

    Using 11.04, if that helps

    • desgua
      desgua about 13 years
      This doesn't answer, but may be a lesson: "There is no uninstall command and no uninstall option. It is pretty usual to record the list of installed files and remove/uninstall a Python module/program with that list. Options for 'install' command: --record filename in which to record list of installed files" from: redhat.com/archives/rhl-list/2007-May/msg00332.html
    • Ciro Santilli OurBigBook.com
      Ciro Santilli OurBigBook.com about 7 years
  • coergo
    coergo about 12 years
    Can you use pip to install a local package if you know where the source and setup.py files are? I assumed the maintainer would have had to put the files someplace.
  • Ciro Santilli OurBigBook.com
    Ciro Santilli OurBigBook.com about 7 years
    This leaves empty directories behind.