pacman-query
Query the local package database. tldr-pages
On Linux
Linux
Query the local package database and list installed packages and versions
pacman -QIdentifyList only packages that were explicitly installed without version numbers
pacman -QeqIdentifyFind which package owns a file
pacman -Qo filenameIdentifyDisplay information about an installed package
pacman -Qi packageIdentifyDisplay the list of files owned by a specific package
pacman -Ql packageIdentifyList orphan packages (installed as dependencies but unrequired (t) by any package and print in quiet mode (only package name is displayed))
pacman -QdtqIdentifyList installed packages foreign (m) to the repository database
pacman -QmIdentifyList packages that can be upgraded
pacman -QuIdentify