Pamac could remove all orphan packages
The option "remove unrequired dependencies" could remove all orphan packages:
#!/bin/bash
removeOrphans () {
orphans="$(pacman --query --deps --unrequired --quiet)"
if [ "${orphans}" != "" ]; then
execute "removeOrphans" "pacman --remove --recursive --nosave --noconfirm ${orphans}"
fi
}