How to find where a package is installed by pacman?

ArchlinuxPacmanPackage ManagementPacman Package-Manager

Archlinux Problem Overview


I'm installing c++ boost library by pacman -Ss boost-libs. After installation, I want to know where my package is installed in my system.

Is there any pacman command for doing so?

Archlinux Solutions


Solution 1 - Archlinux

I am not on my arch now to check, but I bet pacman -Ql boost-libs or pacman -Qk boost-libs will do the trick by providing you with the list of files installed by the package.

Solution 2 - Archlinux

pacman -Q  boost-libs    #Display version
pacman -Ql boost-libs    #Display file list provided by local package
pacman -Qk boost-libs    #Check the local package database
pacman -Qo /path/to/file #Check if the file is owned by any package

Solution 3 - Archlinux

As of today, in pacman v6.0, the command is slightly changed: pacman -Fl package-name rather than pacman -Ql package-name

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionpgplus1628View Question on Stackoverflow
Solution 1 - ArchlinuxarbulgazarView Answer on Stackoverflow
Solution 2 - Archlinuxw1100nView Answer on Stackoverflow
Solution 3 - ArchlinuxLiang ZhouView Answer on Stackoverflow