How can I get a list of all available dependencies?

I want to run a script only on actual software excluding dependencies. For that I need a list of all available dependencies.

This should help.
https://man.archlinux.org/man/pactree.8

You can use the command “pacman -Qqe” to get a list of explicitly installed packages on Manjaro Linux, which excludes dependencies. This command will list all packages that were explicitly installed by the user, rather than being installed as a dependency of another package.

— ChatGPT

Sorry the previous solution is only for the installed packages. Maybe something like this:

wget https://pkgstats.archlinux.de/api/packages all_packages.txt
# Read the package list
while read package; do
  # Check if the package is a dependency
  if ! pacman -Qi $package | grep -q "Depends On"; then
    # Save actual packages that aren't dependencies
    echo $package >> packages.txt
  fi
done < all_packages.txt

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