Import / export installed packages

One thing Linux offers over Windows is the ability to maintain software via packages. A way I love making use of this in openSUSE is by periodically exporting a list containing my installed packages, which is possible via YaST - Software Management in xml format. The advantage is that whenever I do a fresh install, I don’t need to remember and manually reinstall any software: I simply import the xml and every non-default package I had installed will be added back as if nothing happened. There has to be a way to do something similar with pacman! At least I’m hoping there is, this is an ability I care to have.

I’d like to know if there are any commands to export all installed packages to a list (txt, xml, json, etc) then import this list so that all packages on it which aren’t already installed will be. Ideally in a version agnostic format, so if the package was updated in the repositories since our list was generated the system still knows what it’s looking for.

You have many options for export/import package list.

But direct installing from list from other distro (non arch like) isn’t best idea - some packages may have different names or not exist in repos. You should query and adjust list at first.


Yes, in this case I’m asking for packages in the official repositories only. That’s awesome and seems to be exactly what I was looking for, thanks!

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