# Redundant python folders?

**URL:** <https://discussion.fedoraproject.org/t/redundant-python-folders/209132>\
**Category:** Ask Fedora\
**Tags:** python\
**Created:** [November 23, 2026, 11:32am UTC](https://discussion.fedoraproject.org/t/redundant-python-folders/209132 "2026-11-23T11:32:54Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![entodoays](https://avatars.discourse-cdn.com/v4/letter/e/603e79/32.png) [@entodoays](https://discussion.fedoraproject.org/u/entodoays)\
**Post date:** [November 23, 2026, 11:32am UTC](https://discussion.fedoraproject.org/t/redundant-python-folders/209132/1 "2026-11-23T11:32:54Z")

</div>

Under my `~/.local/lib` folder there are three folders for different python versions, namely, 3.13, 3.14, and 3.15.

I suspect that each time I upgrade Fedora, python is also updated. Can I safely delete the older versions and leave the most recent one?

---

<div class="post-metadata">

**Author:** ![pg-tips](https://avatars.discourse-cdn.com/v4/letter/p/aad0ee/32.png) [@pg-tips](https://discussion.fedoraproject.org/u/pg-tips)\
**Post date:** [November 23, 2026, 11:34am UTC](https://discussion.fedoraproject.org/t/redundant-python-folders/209132/2 "2026-11-23T11:34:52Z")

</div>

> [@entodoays](#):
>
> I suspect that each time I upgrade Fedora, python is also updated

Fedora upgrades shouldn’t touch `~/.local/lib`. The Fedora-shipped Python will be under `/usr`.

So the answer depends on what is installing into `~/.local/lib`.

---

<div class="post-metadata">

**Author:** ![entodoays](https://avatars.discourse-cdn.com/v4/letter/e/603e79/32.png) [@entodoays](https://discussion.fedoraproject.org/u/entodoays)\
**Post date:** [November 23, 2026, 11:40am UTC](https://discussion.fedoraproject.org/t/redundant-python-folders/209132/4 "2026-11-23T11:40:57Z")

</div>

The python folder contains one sub-folder: `site-packages`. I know of one particular programme that is using python and adding content there. Since Fedora might be using the newer version of python, I guess it creates a python folder with the respective version.

---

<div class="post-metadata">

**Author:** ![pg-tips](https://avatars.discourse-cdn.com/v4/letter/p/aad0ee/32.png) [@pg-tips](https://discussion.fedoraproject.org/u/pg-tips)\
**Post date:** [November 23, 2026, 11:43am UTC](https://discussion.fedoraproject.org/t/redundant-python-folders/209132/5 "2026-11-23T11:43:09Z")

</div>

So you could try renaming the older folders to `3.13-bak` and `3.14-bak` or something.

If that doesn’t break anything then it suggests they’re safe to delete.

---

<div class="post-metadata">

**Author:** ![computersavvy](https://sea1.discourse-cdn.com/fedoraproject/user_avatar/discussion.fedoraproject.org/computersavvy/32/4741_2.png) [@computersavvy](https://discussion.fedoraproject.org/u/computersavvy)\
**Post date:** [November 23, 2026, 2:11pm UTC](https://discussion.fedoraproject.org/t/redundant-python-folders/209132/6 "2026-11-23T14:11:11Z")

</div>

Any time a user creates a venv using python it will build that subdirectory under ~/.local/lib for the appropriate python version being used in the virtual environment.

I have these

```plaintext
$ ls .local/lib
python3.11 python3.12 python3.13 python3.14 Qt

```

and each contains the following

```plaintext
$ ls .local/lib/python*
.local/lib/python3.11:
site-packages

.local/lib/python3.12:
site-packages

.local/lib/python3.13:
site-packages

.local/lib/python3.14:
site-packages

```

This is because a venv does not necessarily require using the exact version of python that is standard for the global system so a local version specific for the user is installed to support the app in use.

My global system under /usr/lib contains python versions 3.12, 3.13, 3.14, and 3.15 which reveals the updates over time that my system has been installed and upgraded.

---

<div class="post-metadata">

**Author:** ![et-ducky](https://sea1.discourse-cdn.com/fedoraproject/user_avatar/discussion.fedoraproject.org/et-ducky/32/57754_2.png) [@et-ducky](https://discussion.fedoraproject.org/u/et-ducky)\
**Post date:** [November 23, 2026, 3:10pm UTC](https://discussion.fedoraproject.org/t/redundant-python-folders/209132/7 "2026-11-23T15:10:14Z")

</div>

> Any time a user creates a venv using python it will build that subdirectory under ~/.local/lib for the appropriate python version being used in the virtual environment.

A venv keeps its packages in `lib/pythonX.Y/site-packages` inside the venv’s own directory, so creating one doesn’t add folders under `~/.local/lib` ([https://docs.python.org/3/library/venv.html](https://docs.python.org/3/library/venv.html)). `~/.local/lib/python3.13/site-packages` is the per-user site directory, where pip installs packages for Python 3.13 when it runs as a normal user ([https://docs.python.org/3/library/site.html](https://docs.python.org/3/library/site.html)).

Drafted with AI, reviewed by me.

---

<div class="post-metadata">

**Author:** ![mjg](https://sea1.discourse-cdn.com/fedoraproject/user_avatar/discussion.fedoraproject.org/mjg/32/643_2.png) [@mjg](https://discussion.fedoraproject.org/u/mjg)\
**Post date:** [November 23, 2026, 3:23pm UTC](https://discussion.fedoraproject.org/t/redundant-python-folders/209132/8 "2026-11-23T15:23:47Z")

</div>

`pip install foo` as a non-root user will install package `foo` in the user python sitedir, which depends on python version and is the one you mentioned.

So the behavior is not odd, even though it is typical for odd Fedora versions - those are the ones where we upgrade Python to a new major version 😉

Unless you keep around (and need) a previous python version, you can delete the old subdirectories. I used to use them as a reminder of what to `pip install`, but these days I rather keep a package list for that.

---

<div class="post-metadata">

**Author:** ![computersavvy](https://sea1.discourse-cdn.com/fedoraproject/user_avatar/discussion.fedoraproject.org/computersavvy/32/4741_2.png) [@computersavvy](https://discussion.fedoraproject.org/u/computersavvy)\
**Post date:** [November 24, 2026, 12:51am UTC](https://discussion.fedoraproject.org/t/redundant-python-folders/209132/9 "2026-11-24T00:51:39Z")

</div>

> [@et-ducky](#):
>
> `~/.local/lib/python3.13/site-packages` is the per-user site directory, where pip installs packages for Python 3.13 when it runs as a normal user ([site — Site-specific configuration hook — Python 3.15.2 documentation](https://docs.python.org/3/library/site.html)).

I agree.

I misspoke when I likened it to a venv, but rather you are correct in that .local/lib/python3.13 will contain user installed python packages (not installed using sudo or root privileges.)

In other words, if the OP deletes those directories he will lose any python packages he may have installed as the user for those versions of python, as well as (potentially) disrupting the installation history for python packages (if such a history is maintained.)

Removal should be done by uninstalling the relevant python packages for each version intended to be removed _before_ deleting the directories.

---

<div class="post-metadata">

**Author:** ![mjg](https://sea1.discourse-cdn.com/fedoraproject/user_avatar/discussion.fedoraproject.org/mjg/32/643_2.png) [@mjg](https://discussion.fedoraproject.org/u/mjg)\
**Post date:** [November 24, 2026, 3:16pm UTC](https://discussion.fedoraproject.org/t/redundant-python-folders/209132/10 "2026-11-24T15:16:50Z")

</div>

What installation history?

---

<div class="post-metadata">

**Author:** ![computersavvy](https://sea1.discourse-cdn.com/fedoraproject/user_avatar/discussion.fedoraproject.org/computersavvy/32/4741_2.png) [@computersavvy](https://discussion.fedoraproject.org/u/computersavvy)\
**Post date:** [November 24, 2026, 11:36pm UTC](https://discussion.fedoraproject.org/t/redundant-python-folders/209132/11 "2026-11-24T23:36:33Z")

</div>

You would need to use pip to uninstall the package for the version to be removed. I do not know if there is a history retained for what is installed, but I do know the user installed packages can mostly be identified by looking in the `~/.local/lib/python<version>/site-packages` directory.

---

<div class="post-metadata">

**Author:** ![entodoays](https://avatars.discourse-cdn.com/v4/letter/e/603e79/32.png) [@entodoays](https://discussion.fedoraproject.org/u/entodoays)\
**Post date:** [November 25, 2026, 11:01am UTC](https://discussion.fedoraproject.org/t/redundant-python-folders/209132/12 "2026-11-25T11:01:46Z")

</div>

I realised that the python3.13 folder was empty, so I deleted it. The python3.14 folder wasn’t empty, but I renamed it and it was not recreated. I suspect that it is redundant as well – in my system – and the python programs I’m using are using the default python version. I confirm this because both the 3.14 and the 3.15 folders have copies of the same sub-folders.
