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:


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.

| 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? – user89272 Nov 29 '11 at 23:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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