5

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?

5
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

  • Seriously, a loop? – Tom Yan Apr 5 '16 at 14:46
  • 1
    @TomYan is this better? "pacman -S $(< package.list.txt)" – hikmet Apr 5 '16 at 17:00
  • Why not just quote the (decent) commands from the ArchWiki? Edited. – Tom Yan Apr 5 '16 at 17:36

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.