There is no setup.py uninstall

Seems there’s no way to uninstall a Python application that you’ve installed with python setup.py install, short of manually scraping out the files it creates. I spent a short while this morning looking for some sort of python setup.py uninstall, but apparently it doesn’t exist.

Until the Python gurus can cue me in, I used this roundabout way to gut a misbehaving Python program from my system. After installing it and finding that it didn’t do what I wanted, I “reinstalled” it again with the same command, plus one flag.

python setup.py install --record files.txt

I got a nice clean list of files and their paths, which I could then conveniently “uninstall” with this:

cat files.txt | xargs rm -rf

It seemed to do the trick.

About these ads

12 thoughts on “There is no setup.py uninstall

    1. K.Mandla Post author

      checkinstall would have worked fine … except I wasn’t using Ubuntu. I was playtesting an application in Crux that had no port, although I was considering making one. Unfortunately application didn’t quite work the way I expected, so there was little point in going any further with it. And then I wanted to uninstall it. …

      Reply
  1. hnhn

    Better check the resulting files.txt before running the removes.
    /usr/share/applications got listed in mine, so I removed a number of other files :(

    Reply
  2. Pingback: sandy's status on Sunday, 28-Jun-09 20:18:32 UTC - Identi.ca

  3. Pingback: Desinstalar programas python | Uninstall python applications | La plaga Tux

  4. Pingback: Tips’nTricks: eliminare applicazioni in Python « Idl3's Blog

  5. Pingback: Python模块的反安装 - Nine Rivers 九河下稍

  6. Pingback: Clearing out the bookmarks … again | Motho ke motho ka botho

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s