Silly question: How do I know which packages require a package?

Hi all,
I found installed the python-google-genai package.

I don’t know why this package was installed and the only info I found was “installed as dependency of another package”

How can I determine which package requires python-google-genai ?

Pamac says

pamac info python-google-genai
Nome                          : python-google-genai
Versione                      : 1.60.0-1
Descrizione                   : GenAI Python SDK.
URL                           : https://github.com/googleapis/python-genai
Licenze                       : Apache-2.0
Repository                    : AUR
Gruppi                        : --
Dipendenze necessarie         : python python-anyio python-google-auth python-httpx python-pydantic python-requests python-tenacity python-websockets python-typing_extensions python-distro python-sniffio
Dipendenze opzionali          : python-aiohttp
                                python-sentencepiece
                                python-protobuf
Dipendenze per la costruzione : python-setuptools python-build python-installer python-wheel
Controlla le dipendenze       : python-certifi python-pillow python-pytest python-pytest-asyncio python-mcp python-aiohttp python-sentencepiece python-protobuf
Fornisce                      : --
Sostituisce                   : --
In conflitto con              : --
Manutentore                   : medaminezghal
Primo invio                   : dom 2 feb 2025, 08:22:24
Ultima modifica               : gio 29 gen 2026, 10:10:10
Voti                          : 2
Obsoleto                      : --

To get the output in english, so that everyone can understand it:

LANG=C pamac info python-google-genai

Here is the pacman rosetta, with examples of how pacman commands correspond to those that other package managers use:

https://wiki.archlinux.org/title/Pacman/Rosetta#Querying_package_dependencies

for this package:

LANG=C pacman -Sii python-google-genai
LANG=C pacman -Si python-google-genai
or
LANG=C pacman -Qii python-google-genai
LANG=C pacman -Qi python-google-genai

… only if it is actually installed - otherwise pacman does not “know” about it, since it is a package from AUR

the packages this is required by are also listed here - on the AUR page:

https://aur.archlinux.org/packages/python-google-genai

3 Likes
pacman -Qi python-google-genai | grep 'Required By'
2 Likes

Well, no luck: seems it is not required

[mirto@manjaro ~]$ LANG=C pacman -Qi python-google-genai | grep 'Required By'
Required By     : None
[mirto@manjaro ~]$ LANG=C pacman -Qi python-google-genai
Name            : python-google-genai
Version         : 1.55.0-1
Description     : GenAI Python SDK.
Architecture    : any
URL             : https://github.com/googleapis/python-genai
Licenses        : Apache-2.0
Groups          : None
Provides        : None
Depends On      : python  python-anyio  python-google-auth  python-httpx  python-pydantic  python-requests  python-tenacity  python-websockets  python-typing_extensions
Optional Deps   : python-aiohttp: aiohttp [installed]
                  python-sentencepiece: local-tokenizer [installed]
                  python-protobuf: local-tokenizer [installed]
Required By     : None
Optional For    : python-posthog
Conflicts With  : None
Replaces        : None
Installed Size  : 9,41 MiB
Packager        : Unknown Packager
Build Date      : ven 19 dic 2025, 21:27:11
Install Date    : ven 19 dic 2025, 21:27:23
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : None

[mirto@manjaro ~]$ 

In that case you can safely remove it if you don’t need it. It was probably a build-time dependency for another AUR package. :backhand_index_pointing_down:

sudo pacman -R python-google-genai

And while you’re at it, check your orphans… :backhand_index_pointing_down:

pacman -Qdtq

In order to remove them… :backhand_index_pointing_down:

sudo pacman -Rns $(pacman -Qdtq)
1 Like

Sorry I forgot the LANG=C

I didn’t know rosetta. Thanks

The package exists

LANG=C pacman -Qi python-google-genai
Name            : python-google-genai
Version         : 1.55.0-1
Description     : GenAI Python SDK.
Architecture    : any
URL             : https://github.com/googleapis/python-genai
Licenses        : Apache-2.0
Groups          : None
Provides        : None
Depends On      : python  python-anyio  python-google-auth  python-httpx  python-pydantic  python-requests  python-tenacity  python-websockets  python-typing_extensions
Optional Deps   : python-aiohttp: aiohttp [installed]
                  python-sentencepiece: local-tokenizer [installed]
                  python-protobuf: local-tokenizer [installed]
Required By     : None
Optional For    : python-posthog
Conflicts With  : None
Replaces        : None
Installed Size  : 9,41 MiB
Packager        : Unknown Packager
Build Date      : ven 19 dic 2025, 21:27:11
Install Date    : ven 19 dic 2025, 21:27:23
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : None

The four commands say or “package not found” o “Required by: None”

[mirto@manjaro ~]$ LANG=C pacman -Sii python-google-genai
error: package 'python-google-genai' was not found
[mirto@manjaro ~]$ LANG=C pacman -Si python-google-genai
error: package 'python-google-genai' was not found
[mirto@manjaro ~]$ LANG=C pacman -Qii python-google-genai
Name            : python-google-genai
Version         : 1.55.0-1
Description     : GenAI Python SDK.
Architecture    : any
URL             : https://github.com/googleapis/python-genai
Licenses        : Apache-2.0
Groups          : None
Provides        : None
Depends On      : python  python-anyio  python-google-auth  python-httpx  python-pydantic  python-requests  python-tenacity  python-websockets  python-typing_extensions
Optional Deps   : python-aiohttp: aiohttp [installed]
                  python-sentencepiece: local-tokenizer [installed]
                  python-protobuf: local-tokenizer [installed]
Required By     : None
Optional For    : python-posthog
Conflicts With  : None
Replaces        : None
Installed Size  : 9,41 MiB
Packager        : Unknown Packager
Build Date      : ven 19 dic 2025, 21:27:11
Install Date    : ven 19 dic 2025, 21:27:23
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : None
Backup Files    : None
Extended Data   : None

[mirto@manjaro ~]$ LANG=C pacman -Qi python-google-genai
Name            : python-google-genai
Version         : 1.55.0-1
Description     : GenAI Python SDK.
Architecture    : any
URL             : https://github.com/googleapis/python-genai
Licenses        : Apache-2.0
Groups          : None
Provides        : None
Depends On      : python  python-anyio  python-google-auth  python-httpx  python-pydantic  python-requests  python-tenacity  python-websockets  python-typing_extensions
Optional Deps   : python-aiohttp: aiohttp [installed]
                  python-sentencepiece: local-tokenizer [installed]
                  python-protobuf: local-tokenizer [installed]
Required By     : None
Optional For    : python-posthog
Conflicts With  : None
Replaces        : None
Installed Size  : 9,41 MiB
Packager        : Unknown Packager
Build Date      : ven 19 dic 2025, 21:27:11
Install Date    : ven 19 dic 2025, 21:27:23
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : None

[mirto@manjaro ~]$ 

Still I don’t know why this package was installed. :sad_but_relieved_face:

Maybe..

I told you so in post #5:wink:

:backhand_index_pointing_down:

1 Like

Do you need to know?
Why?
You could wade through all of /var/log/pacman.log in order to find when it was first installed - and correlate that with what was installed at around the same time.
But I’d say:
all you need to know is that it is not needed anymore.

1 Like

Hi @Aragorn , @anon33601770 thanks for the suggesions.

Now I don’t have any orphan

[mirto@manjaro ~]$ LANG=C pacman -Qdtq
[mirto@manjaro ~]$ 

Still the damned package is there

[mirto@manjaro ~]$ LANG=C pamac upgrade
Preparing...
==== AUTHENTICATING FOR org.manjaro.pamac.commit ====
Authentication is required to install, update, or remove packages
Authenticating as: mirto
Password: 
==== AUTHENTICATION COMPLETE ====
Sincronizzazione database dei pacchetti...
Aggiornamento AUR...                                                                                                                                                                                                    
Nothing to do.                                                                                                                                                                                                          
Checking sentencepiece dependencies...
Checking python-google-genai dependencies...
Checking python-tokenizers dependencies...
Checking python-docstring-parser dependencies...
Checking python-sentencepiece dependencies...
Checking python-mcp dependencies...
Checking python-httpx-sse dependencies...
Checking python-sse-starlette dependencies...
Checking python-uv-dynamic-versioning dependencies...
Checking python-async-timeout dependencies...
Checking python-asgi-lifespan dependencies...
Resolving dependencies...
Checking inter-conflicts...
Error: Failed to prepare transaction:
could not satisfy dependencies:
- unable to satisfy dependency 'sentencepiece=0.2.1-1' required by python-sentencepiece



Edit build files : [e] 
Apply transaction ? [e/y/N] 

Transaction cancelled.

I’ll do what @anon33601770 suggest: remove explictly every offending package :carpentry_saw:

Thanks for your time

If you removed it with pacman, then it isn’t there anymore. However, as I told you, it will have been a build-time dependency for another package.

This means that, in and of itself, python-google-genai is not needed by anything on your system, but it is needed for (re)building another AUR package that you have installed.

As such, when you run an update process through pamac and it finds an update for this other AUR package, then it will pull in python-google-genai again in order to rebuild this other AUR package.

The output you’re seeing is simply pamac checking the PKGBUILD for dependencies — ­build-time or otherwise — and reporting that python-google-genai is available. It does not mean that you still have python-google-genai on your system.

So, you have a broken package on your system, i.e. python-sentencepiece, because it needs another package named sentencepiece in version 0.2.1-1, which is not (or no longer) available. Therefore, you should remove python-sentencepiece. :backhand_index_pointing_down:

sudo pacman -R python-sentencepiece

If you really need this software, then you could try the precompiled version instead… :backhand_index_pointing_down:

pamac build python-sentencepiece-bin

Likewise, if you want sentencepiece, there is a precompiled version of it in the AUR, sentencepiece-bin.

If it isn’t showing as being a dependency for another package, there are two possibilities.

  1. You’ve uninstalled whatever package requires it. In which case you can safely remove it.
  2. It was needed during the build process of an AUR package, but isn’t actually needed to run that package’s programs. Again, you can safely remove it. But be aware that at some point whatever package needed it for building has to be rebuilt, it’ll download this package again.

Unfortunately, I don’t know any way to differentiate between those two scenarios.

The PKGBUILD lists the Make Deps. But of course, it’s difficult to tell which package exactly has python-google-genai as a dependency. It could be any of the python-* packages his pamac output lists.

Well, @Aragorn @beermad I solved removing all the listed packages one by one, starting from sentencepiece

sudo pacman -R sentencepiece

Now I can run pamac upgrade without errors and the pamac gui stopped from saying that there are packages to upgrade.

[mirto@manjaro ~]$ LANG=C pamac upgrade
Preparing...
==== AUTHENTICATING FOR org.manjaro.pamac.commit ====
Authentication is required to install, update, or remove packages
Authenticating as: mirto
Password: 
==== AUTHENTICATION COMPLETE ====
Sincronizzazione database dei pacchetti...
Aggiornamento AUR...                                                                                                                                                                                                    
Nothing to do.                                                                                                                                                                                                          
Transaction successfully finished.
[mirto@manjaro ~]$ 

About the @anon33601770 question, I don’t like that anything related to AI and neural networks will be installed behind the scenes without my explicit consent.
And sentencepiece, that I never explicity installed, seems related to neural networks:

[mirto@manjaro ~]$ LANG=C pamac info sentencepiece
Name                  : sentencepiece
Version               : 0.2.1-2
Description           : Unsupervised text tokenizer for Neural Network-based text generation
URL                   : https://github.com/google/sentencepiece
Licenses              : Apache-2.0
Repository            : AUR
Groups                : --
Depends On            : libgcc libstdc++ glibc abseil-cpp gperftools protobuf
Optional Dependencies : --
Make Dependencies     : git cmake abseil-cpp gperftools protobuf python python-build python-setuptools python-wheel python-installer
Check Dependencies    : python-pytest
Provides              : libsentencepiece.so libsentencepiece_train.so
Replaces              : --
Conflicts With        : --
Maintainer            : Henry-ZHR
First Submitted       : dom 10 mar 2024, 07:42:04
Last Modified         : dom 15 feb 2026, 07:48:33
Votes                 : 9
Out of Date           : --

[mirto@manjaro ~]$ 

I can understand that.
You want to know why.

That thing was installed:

python-google-genai

Why was it installed?
Only you can know - and you probably should.
If you don’t remember, you surely can find out by digging through the pacman.log

The other bits and pieces are not “infecting” your system with AI by themselves, they are just components of a bigger whole.
They should be orphans by now and as such can be removed.

1 Like

Now that you’ve cleared out your orphan packages, and dealt with a couple of packages that are no longer in Manjaro’s repos, you should run a check for other foreign packages.

Foreign packages are packages that are not in Manjaro’s repos, such as AUR packages, or packages installed manually via git & makepkg. Over time, some packages originally in the repos will be removed due to dependency changes or lack of maintenance (abandoned) etc. They may then be moved to the AUR (or, in some cases, disappear completely).

To check for foreign packages:

pamac list -m

You should be able to remove any foreign packages you don’t want on your system without any issues, as they are not required for your system to operate.

You can check a package’s details and dependencies with the following command:

pamac info the-package-name

To remove a package:

pamac remove the-package-name

Removing some foreign packages may create more orphans. So, after foreign package removal you should do another orphans check by either using the pacman command provided earlier by @Aragorn , or via pamac in a terminal (instructions are below).

If you prefer using a GUI, you can also open the Software Centre/Package Manager (Pamac’s GUI), click on the Installed tab, and select the Orphans or Foreign section to individually review packages for removal or retention.

Using the CLI, to list orphaned packages (packages which were installed as dependencies of other packages, but are no longer required due to the package which initially required them being removed or changing its dependencies), run this command:

pamac list -o

Special note: don’t use sudo with pamac, as pamac uses polkit for authorisation and will prompt you for your password when required.

You can easily remove all orphaned packages (including their configuration files) with a single command:

pamac remove -no

However, before running the above the above command you should check the list for any orphaned packages which you may want to keep on your system. You can then prevent those packages from being marked as orphans by changing their flags to “explicitly installed” in the pacman database:

sudo pacman -D --asexplicit the-package-name

The Pamac GUI also allows you to mark packages as explicitly installed if you prefer using a GUI.

4 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.