how to reinstall all packages in the system? / Pacman ...
bbs.archlinux.org › viewtopicJun 24, 2007 · That could be simplified with the 'comm' command: #!/bin/bash pacman -Q | awk ' { print $1 }' | sort > /tmp/pacman-installed.tmp pacman -Qm | awk ' { print $1 }' | sort | comm -3 /tmp/pacman-installed.tmp - > /tmp/pacman-to-reinstall.tmp pacman -S --noconfirm $ (cat /tmp/pacman-to-reinstall.tmp) rm /tmp/pacman- {to-reinstall,installed}.tmp.