0

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 commands or how should I go about doing this?

1

You can use pacman -Qeq instead of pacman -Qe | awk '{print $1}'. And pacman can not install AUR packages, better keep them in a separate list or use an AUR helper like pacaur or yaourt.

So, if you use an AUR helper like pacaur, you can export all explicitly installed packages with:

pacman -Qqe > package_list.txt

Or if you prefer only native and explicitly installed packages:

pacman -Qqen > package_list.txt

To install the packages listed in the file:

pacman -S - < package_list.txt

Replace pacman with pacaur or your AUR helper if needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.