Linux – How to make a list/file for pacman to install from

arch linuxlinuxpackage-managementscript

I am trying to move from one arch install a (partitioned one) to another (a less-partitioned one) on my computer and I want a similar set up. So I was wondering if there was a simple way to get pacman to install the same packages.

I was thinking of something like

pacman -Qe | awk '{print $1}' > package_list.txt

then creating a script to install from that list. Is there a way I can create that script in a few comands; if not, how should I go about doing this?

Best Answer

pacman -Qqen > pkglist.txt

To install:

pacman -S - < pkglist.txt

From ArchWiki: https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#List_of_installed_packages

Related Question