Find currently-installed dependencies/packages for a package I want to install

I want to install qt6-webengine. It has a large amount of dependencies and I want to see which are already installed.

I can do this manually via Pamac and GPT says I can do it manually also by:

pacman -Si packagename

pacman -Qq

and I have to compare manually.

Is there a way to see which dependencies are already installed for a package that I want to install?

You won’t get much success with that - there is no package qt6-webkit

You posted some garbage commands. Rather than asking gpt, read the actual manuals or archwiki.

sorry I made a mistake, I meant qt6-webengine

You can do all sorts of thins with scripting - it requires some filtering and utilities

e.g. this will give you a list of dependencies

pacman -Si qt6-webengine | awk -F'[:]' '/^Depends/ {print $2}'

You can then compare that list to a list of installed packages

pacman -Qqen

You can feed the two results to comm - which in turn can display the differences or only parts of it e.g. those from the dependency list that is not in the installed list.

There is a bag of tricks at pacman/Tips and tricks - ArchWiki

thank you for the non-answer. I came to ask here precisely because I did search and read and found nothing.

It’s a perfectly valid answer. You are talking about comparing those two commands which is just nonsense.

There is no other way than do it “manually”, just not the way you and chatgpt are proposing. You can write a script though. @linux-aarhus already gave you some good pointers. Or you can use expac

expac -S '%n Depends on: %D' qt6-webengine; for i in $(expac -S '%D' qt6-webengine); do pacman -Q $i; done
1 Like