Solved Too many pythons

I have many different versions of python installed. Do I really need all of those?


Code:
python-3.11_3,2             =  up-to-date with port
python2-2_3                 =  up-to-date with port
python27-2.7.18_4           =  up-to-date with port
python3-3_4                 =  up-to-date with port
python311-3.11.11           =  up-to-date with port
python38-3.8.20             =  up-to-date with port
python39-3.9.21             =  up-to-date with port
 
If you're building from ports then definitely take a closer look at /usr/ports/Mk/bsd.default-versions.mk and define the appropriate port version(s) in /etc/make.conf; that can save you a lot of hassle.
 
Code:
# pkg autoremove -n | grep python
        python2: 2_3
        python38: 3.8.20

I dont have python default versions defined in /etc/make.conf

In bsd.default-versions.mk i have:

Code:
PYTHON_DEFAULT?=        3.11
PYTHON2_DEFAULT?=       2.7
 
I have hard time deciphering this.
So can I remove python2, python38 and python ?

Code:
# pkg info -r -g 'python*'
python-3.11_3,2:
python2-2_3:
python27-2.7.18_4:
        python2-2_3
python3-3_4:
        python-3.11_3,2
python311-3.11.11:
        gobject-introspection-1.78.1_2,1
        glib-2.80.5_1,2
        gtk-doc-1.33.2_3
        yelp-tools-42.0_1
        itstool-2.0.7_1
        meson-1.7.0
        ninja-1.11.1,4
        py311-docutils-0.21.2,1
        samba420-4.20.7_4
        ldb29-2.9.2_2
        tdb1410-1.4.10_2,1
        tevent016-0.16.1_2
        talloc242-2.4.2_2
        py311-sphinxcontrib-websupport-2.0.0
        py311-semantic-version-2.10.0_1
        py311-flit-core-3.11.0
        py311-gi-docgen-2024.1_1
        py311-markupsafe-2.1.5_1
        llvm19-19.1.7_1
        py311-pexpect-4.9.0_1
        py311-ptyprocess-0.7.0_1
        py311-myst-parser-4.0.1
        py311-recommonmark-0.5.0_3
        py311-sniffio-1.3.1
        py311-setuptools-63.1.0_2
        py311-sphinx-5.3.0_3,1
        doxygen-1.9.6_2,2
        llvm15-15.0.7_10
        texlive-base-20240312_1
        py311-requests-2.32.3
        py311-urllib3-1.26.20,1
        py311-numpy-1.26.4_6,1
        py311-dnspython-2.7.0,1
        py311-trio-0.29.0
        py311-sortedcontainers-2.4.0_1
        py311-outcome-1.3.0_2
        py311-async_generator-1.10_1
        py311-aioquic-1.2.0
        py311-service-identity-24.2.0
        py311-pyasn1-modules-0.4.1
        py311-pyasn1-0.6.0
        py311-attrs-25.1.0
        py311-hatch-vcs-0.4.0_1
        py311-openssl-24.1.0_1,1
        py311-sphinx-markdown-tables-0.0.17_1,1
        rpm4-4.18.2_3
        py311-cryptography-42.0.8_7,1
        py311-setuptools-rust-1.10.2
        vim-9.1.1199
        py311-pyyaml-6.0.1_1
        py311-mdit-py-plugins-0.4.2
        py311-markdown-it-py-3.0.0
        py311-mdurl-0.1.2_2
        py311-Jinja2-3.1.6
        mc-4.8.32
        py311-httpx-0.28.1
        py311-httpcore-1.0.7
        py311-pygments-2.19.1
        xcb-proto-1.17.0
        py311-lxml-4.9.3_1
        py311-mako-1.3.5_1
        py311-typogrify-2.1.0
        py311-importlib-metadata-8.6.1
        py311-hatch-fancy-pypi-readme-24.1.0
        py311-libxml2-2.11.9_1
        py311-beaker-1.13.0
        py311-charset-normalizer-3.4.1_1
        py311-hatchling-1.27.0
        py311-certifi-2025.1.31
        py311-exceptiongroup-1.2.2
        py311-zipp-3.21.0
        py311-trove-classifiers-2025.2.18.16
        py311-asn1crypto-1.5.1_1
        py311-pysocks-1.7.1_1
        py311-cffi-1.17.1
        py311-flit-scm-1.7.0_3
        py311-markdown-3.6
        py311-pycparser-2.22
        py311-calver-2022.6.26_1
        py311-snowballstemmer-2.2.0_1
        py311-pluggy-1.5.0
        py311-anyio-4.8.0
        py311-truststore-0.10.1
        py311-pytest-runner-6.0.1
        py311-imagesize-1.4.1_1
        py311-toml-0.10.2_1
        py311-chardet-5.2.0,1
        py311-pyparsing-3.2.1
        scons-py311-4.7.0
        py311-six-1.17.0
        py311-setuptools-scm-8.0.4_1
        py311-pylsqpack-0.3.19
        py311-wheel-0.45.1
        py311-sphinxcontrib-devhelp-2.0.0
        py311-iso8601-2.1.0
        py311-sphinxcontrib-htmlhelp-2.1.0
        py311-pathspec-0.12.1
        py311-socksio-1.0.0_1
        py311-poetry-core-2.1.1
        py311-sphinxcontrib-applehelp-2.0.0
        py311-alabaster-0.7.16
        py311-typing-extensions-4.12.2
        py311-sphinxcontrib-qthelp-2.0.0
        py311-idna-3.10
        py311-sphinxcontrib-serializinghtml-2.0.0
        py311-build-1.2.2_2
        py311-sphinx_rtd_theme-1.0.0_1
        py311-CommonMark-0.9.1_2
        py311-future-0.18.3_1
        py311-packaging-24.2
        py311-Babel-2.17.0_1
        py311-h2-4.1.0_1
        py311-hyperframe-6.0.0_1
        py311-sphinxcontrib-jsmath-1.0.1_1
        py311-ply-3.11_1
        py311-hpack-4.0.0_1
        py311-pyproject-hooks-1.2.0
        py311-h11-0.14.0_1
        py311-tomli-2.1.0
        py311-pystemmer-2.0.1_1
        py311-cython-0.29.37_2
        py311-installer-0.7.0
        py311-smartypants-2.0.1_1
        py311-pytz-2024.2_1,1
        python-3.11_3,2
        python3-3_4
python38-3.8.20:
python39-3.9.21:
        opencv-4.9.0_1
 
These packages have no consumer.
Code:
python-3.11_3,2:
python2-2_3:

These packages have a consumer with no consumer (previous listed python packages)
Code:
python27-2.7.18_4:
python3-3_4:

All these python packages can be removed safely.
 
Back
Top