pacman -Q

This command is an alias of pacman --query.

tldr pacman query