Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 05-12-2009, 10:28 PM   #1
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
How do I uninstall python2.4?

I want to remove python2.4, but keep python2.5.

There's a s*** ton of python2.4 virtual packages. If I go in & purge the package that includes them, it typically breaks a python2.5 package as well.

Do I need to purge all of python2.4/2.5 then reinstall python2.5 or is there a better way?

at the end of the day, I'm trying to resolve this issue with trac:

[Tue May 12 20:22:43 2009] [error] [client]   File "/usr/lib/python2.5/site-packages/Pyrex/Distutils/", line 30, in Extension\n    """, referer: http://trac/your
[Tue May 12 20:22:43 2009] [error] [client] TypeError: unsupported operand type(s) for +: 'NoneType' and 'str', referer: http://trac/your
I believe it has something to do with a python2.4/2.5 mixup in the distutils module. This started happening one day after I did an apt-get upgrade. Worked fine before, now trac doesn't work. If anyone has a clue on either issue, I'd be much obliged.
Old 05-13-2009, 12:07 AM   #2
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
You can use the -s switch with aptitude ("s" for simulate) and try out any command you like without committing yourself to any change. aptitude finishes by telling you what it would do but it doesn't do anything. When you a command that does what you like you can then rerun aptitude without the -s switch (and as root) and it will actually perform the operation.
So you could test out this:
aptitude -s remove python2.4
and if you're happy with the result. Run the command as normal.
Old 05-13-2009, 10:10 AM   #3
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Original Poster
Rep: Reputation: 51
Thanks for the reply. I'm familiar with that option, but I don't think it answers the question.

Still wondering how to remove all things python2.4. I've a tried to simply remove the python2.4 package (granted, using aptitude rather than apt-get) and it didn't let me - too many dependencies... so I've been trying to remove each of those dependencies one by one. I think I've gotten all of them, but before I give it the go ahead (which will likely break python2.5 as well, though that can be fixed), I'd like to see if someone's done this before & can tell me a better way or confirm this is the correct way.
Old 05-13-2009, 02:03 PM   #4
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,243
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
so what wrong with removing 2.4 then re-installing 2.5 if necessary ?

aptitude purge python2.4
aptitude install python2.5

Unless you've been mixing and matching your use of package management programs (apt-get, aptitude, etc..), removing 2.4 shouldn't remove any dependencies needed for 2.5


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python2.5-devel is unable to find installed Python2.5 Setya SUSE / openSUSE 1 06-08-2007 01:35 AM
Python2.4 sanu Linux - Newbie 1 04-01-2005 07:31 AM
python2.2 is not available? darrylneufeld Fedora 4 06-01-2004 08:10 AM
How to Uninstall Python2.3 wich was compiled frm source? Electronkz Linux - Software 1 04-27-2004 12:00 AM
python2.2 Dependencies webboss Linux - General 3 03-06-2002 04:20 AM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:32 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration