Source

bin / pacreview

#!/bin/sh
echo "(i)nformation | (k)eep | (l)ist files | (r)emove | remove package and (o)rphans | (q)uit | (?)help"
for pkg in $(pacman -Qdtq) $(pacman -Qetq); do
	while true; do
		printf "%-20s: (iklroq?): " $pkg
		read -n 1 act
		echo
		case $act in
			i)
				pacman -Qi $pkg
				;;
			k)
				break
				;;
			l)
				pacman -Ql $pkg
				;;
			r)
				sudo pacman --noconfirm -R $pkg
				break
				;;
			o)
				sudo pacman -Rs $pkg
				break
				;;
			q)
				exit
				;;
			?)
				echo "(i)nformation | (k)eep | (l)ist files | (r)emove | remove package and (o)rphans | (q)uit | (?)help"
				;;
			*)
				echo "unknown option: $act"
				;;
		esac
	done
done