Although it is usually best to minimize this, it is sometimes necessary to ask the installer questions during an installation procedure. If you have to do this it a good idea to use the Pacman syntax yes, no, choice to ask the questions and branch on the alternatives, rather than asking questions from a shell script. The Pacman syntax has the advantage that Pacman automatically remembers the answers to the questions so that if the installer repeats the installation or updates the package, the questions don't have to be answered repeatedly. As usual, Pacman takes care of uninstallation correctly independent of the answers to the questions.