Uninstall old Python versions

Hi,

after a recenty upgrade to core 144, I noticed that there are already some Python version installed, as can bee seen in the hardcopy below.

I’m mainly using Python 3, to be exactly Python 3.8.x. Is there a chance to remove old versions from the current installation? FWIW: Pakfire does not offer this.

Michael

I looked at my ipfire, core 144, I do not have anything with 3.6 (pydoc3.6, python3.6, python3.6m, …)

I’ve installed various Python3 libraries from within Pakfire before updating to core 144. Hence, I guess this invoked installing the Python3.6 interpreter, too.
python

After the core update the interpreter obviously got updated to version 3.8, which is fine of course, however, I cannot uninstall the already available libraries, because I guess I will loose Python 3.8, too, which I need of course for various scripts.

So still the question left, how to get rid of Python 3.6?

There’s always this sort of ham-handed hammer swinging approach :cowboy_hat_face:

find / -type f -name ‘py*3.6*’ -print

and if that looks okay, then

find / -type f -name ‘py*3.6*’ -exec rm {} \;

pakfire list | grep python

does it list those 3.6 modules ?

Yes, those and even more:

Name: python-clientform
Name: python-distutils-extra
Name: python-distutils
Name: python-feedparser
Name: python-lzma
Name: python-mechanize
Name: python-optional-src
Name: python-progressbar
Name: python-rssdler
Name: python-xattr
Name: python3-botocore
Name: python3-colorama
Name: python3-dateutil
Name: python3-docutils
Name: python3-jmespath
Name: python3-llfuse
Name: python3-msgpack
Name: python3-pyasn1
Name: python3-rsa
Name: python3-s3transfer
Name: python3-six
Name: python3-yaml

I’d suggest what @cbrown wrote …

Hi,

There’s always this sort of ham-handed hammer swinging approach :cowboy_hat_face:

find / -type f -name ‘py*3.6*’ -print

and if that looks okay, then

find / -type f -name ‘py*3.6*’ -exec rm {} \;

please do not do this.

Some of those add-ons need an update indeed, and unfortunately, there usually is
little time for maintaining all of these. Instead of messing around with the system
(which probably is going to work, but I have no idea about possible side effects),
fixing those issue by becoming engaged in development would be a more sustainable way. :slight_smile:

Looking forward to see you at the development mailinglist. :wink:

Thanks, and best regards,
Peter Müller

1 Like

Did try this already but using command
find / -type f -name ‘py*3.6*’ -print
This did not find any occurrences but resulted in an errror while accessing a specific folder anyway.

Unfortunately, I’m just a user of Python and not a very skilled one (still learning), hence I won’t be of any help on any development mailing, for the purpose of resolving this “issue”.

I even don’t know which version IPFire installs in a fresh installation, my guess is 2.7 and 3.6. I assume that the update to core 144 now added Python 3.8.2, at least this is what the command python3 reveals.

I wouldn’t have noticed this if I hadn’t used some hard coded paths in some of my cron jobs that pointed to a Python version 3.6 which denied working after upgrade to core 144 because of now missing Python libraries.

Michael