Exporting list of packages into CSV

How can I generate a list of package dependencies and dump them into a readable CSV format? Let’s say I need to create a dependency check for a list of packages installed on a system, but I don’t want to have to search for every package dependency manually, but to create a checklist for specific packages that are required for something you want to install that will check if you have that package installed, if not it will run it through a package manager and install those packages through whatever package manager the user might have.

If you’ve got a bunch of packages for a different Linux distribution and you want to install an application, but that other linux distribution packages are named differently say Debian Apt for example, how can you check against that if you’re using AUR package manager like Pamac or Pacman? It’s not like you can just run from the CSV checklist and expect the package manager to find them for you, the names have to be exact. I know Pamac can be bit lenient and list packages based on the names you’ve given it, but for Pacman package names have to be exact or it doesn’t know what you’re looking for.


You can look up libstdc++ in Pamac and it’ll list you a bunch of packages by that name like so:

    Standard C++ libraries for Red Hat 7.3 backwards compatibility compiler. With additions from OpenSUSE 13.1. Provides
   GNU Standard C++ library version 3

Looking up libstdc++ in Pacman however doesn’t list anything, and will tell you it can’t find it.

But let’s also say you got a dependency list from a Debian package, and it wants lib32-libstdc++6 then the package manager for AUR isn’t going to find it, because there is no package by that name specifically. or how about those other i386 labelled packages like libc6:i386 ?

You should read about pactree if you want scripting something about package dependencies :wink:



Neither of those are 'AUR package manager’s … they are just package managers, though pamac can function as an aur helper as well … pacman does not interact with the AUR directly at all.

That is simply not true …

$ pacman -Ss libstdc++
extra/libstdc++5 3.3.6-7
    GNU Standard C++ library version 3

In other words, you want to create a list of packages required for a given package to install – so the list of its dependencies – so that if those packages are not installed, it asks the package manager to install them.
Which, AFAIK, is already what a package manager is supposed to do…

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