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

11 Responses to “There is no setup.py uninstall”


  1. 1 matero 2009/01/08 at 6:36 PM

    isn’t easier install it with checkintall?

    • 2 K.Mandla 2009/01/09 at 8:08 AM

      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. …

  2. 3 Durand 2009/05/13 at 12:04 AM

    Thanks, worked perfectly!

  3. 4 hnhn 2009/05/28 at 8:35 PM

    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 :(

  4. 6 Jóan Petur 2010/10/28 at 10:31 PM

    I would be a little weary of the ‘rm -rf’ command used here :)


  1. 1 sandy's status on Sunday, 28-Jun-09 20:18:32 UTC - Identi.ca Trackback on 2009/06/29 at 5:18 AM
  2. 2 Desinstalar programas python | Uninstall python applications | La plaga Tux Trackback on 2009/10/10 at 4:47 PM
  3. 3 Tips’nTricks: eliminare applicazioni in Python « Idl3's Blog Trackback on 2009/11/12 at 3:43 PM
  4. 4 Python模块的反安装 - Nine Rivers 九河下稍 Trackback on 2010/03/08 at 7:24 AM

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




Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,963,198 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: