Hi, I run Linux Ubuntu 10.04 and I installed Python 2.7 (didn't uninstall Python 2.6 which is Ubuntu 10.04's default). But I realized later on that I didn't have any practical use for keeping 2.7 anymore seeing that I mostly use 2.6 now. How can I remove Python 2.7? I used 'which python2.7' in the terminal and it outputted: '/usr/local/bin/python2.7'. Also, is there someway to check if no files where overwritten when I just installed Python 2.7?

Perhaps I am just being dense, but couldn't you use the synaptic package manager? Type python in the Quick Search and then click on the green box next to the python 2.7 package? I guess I am assuming that you installed the 2.7 version from a package, right? If you did it from a tar ball, I guess you could use the 't' option of tar to list the files in the tar ball perhaps redirecting the output to a text file like this tar -tvf python2.7.tar (or tar -tzvf python2.7.tgz). Then you would have to manually remove each file Ick... The danger is as you pointed out that you might remove a file needed by the 2.6.x version. Hmmmm... why not remove the 2.6 version using the synaptic package manager first! Then reinstall it after you've removed everything related to the 2.7 package? That might work... HTH
Terry

That tar command was supposed to be something like this:
tar -tvf python2.7.tar > /tmp/xxx.txt
Sorry for the confusion.
Terry

Thank you for your fast reply Terry. I installed via source code so I will have to remove them manually... You suggested that I uninstall 2.6 first and then remove each file afterwards, but won't that make Linux bomb out or something? I heard that Python plays a crucial role in Ubuntu's internals?

Wow, I can't believe that python is required for the kernel to run. I could believe that some applications would fail. I just marked the python 2.6.5 package on my system for removal. You wouldn't believe how many applications depend on it. To be honest, I am amazed! An alternative to my previous suggestion would be to not remove the 2.6 version. Restoring all of the apps would be a major pain in the neck.

Instead, use the Synaptic Package Manager and search for python as before. Highlight the python 2.6 package and click on the properties button. Then click on the installed files tab. This should show you the files associated with python 2.6 (in my case 2.6.5). Now you can do the tar command like this...
tar -tvf path to python 2.7 tarball | sort > /tmp/xxx.txt
This should alphabetize the list of files in the tarball which will make it easier for you to compare with the list you got with synaptic package manager. Hope this helps!
Terry

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.