I'm using Linux Mint 11 (will upgrade soon), and I've noticed that, even though I don't have any python2.6 packages installed with apt, there's a bunch of residual python2.6 files scattered around my drive, including, but not limited to, dist-packages in /usr/lib/python2.6 and various /usr/share stuff.

Is there any way to test if these files are still being used?

I'm tempted to sudo rm -rf the lot of them, but I'm scared it'll break stuff.

Also, does anyone have any idea where these files could have come from? I believe I had python2.6 installed once upon a time, but I made sure to --purge them, so there shouldn't be any trace of them left, right?

EDIT: after using a quick script to check all of the files, it appears most of them belong to important packages, so I won't try weeding out the few which I know are probably useless. Although I am curious why so many packages have python2.6 files when I don't even have it installed.

These files are not associated with any packages and I'm not sure if they are safe to remove:

/usr/bin/ipython2.6
/usr/lib/python2.6/dist-packages/distribute-0.6.15.egg-info
/usr/lib/python2.6/dist-packages/easy_install.py
/usr/lib/python2.6/dist-packages/IPython
/usr/lib/python2.6/dist-packages/ipython-0.10.1.egg-info
/usr/lib/python2.6/dist-packages/setuptools
/usr/lib/python2.6/dist-packages/setuptools.egg-info
/usr/lib/python2.6/dist-packages/setuptools.pth
/usr/lib/python2.6/dist-packages/site.py
/usr/lib/python2.6/dist-packages/wx.pth
/usr/local/lib/python2.6
/usr/local/lib/python2.6/dist-packages
/usr/local/lib/python2.6/site-packages
/usr/share/man/man1/ipython2.6.1.gz
link|improve this question
feedback

1 Answer

You could try using dpkg to tell you which package a particular file belongs to (highlighted below):

$ dpkg -S /usr/lib/python2.6/lib-tk/Tkinter.py
python2.6: /usr/lib/python2.6/lib-tk/Tkinter.py
^^^^^^^^^^

Note that .pyc files are byte-code created by the python interpreter and will be re-created if they are deleted.

link|improve this answer
That helps a little, I can see the 2.6 packages belong to some packages. Just to confirm, if I can mark a package for removal in Synaptic and it doesn't ask me to mark any packages that I'm using, is it save to remove? I don't want to remove what looks like a useless lib only to find I can't boot into Mint anymore. There are also some files in /usr/share and manpages that are unassociated though – darkfeline Nov 29 '11 at 23:20
Please clarify. What packages are you thinking about removal of? – Gryllida Nov 29 '11 at 23:42
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.