Find out the path where a package is installed – CentOS

Finding out where a package is located can be useful sometimes. In our example, we will consider the wp-cli package. We had on a server three installations of wp-cli. One was installed by default by cPanel, another two were installed manually when testing a tutorial on how to install wp-cli .

To list the files installed by a package, use the command:

# rpm -ql <package-name>

Example for our wp-cli package:

root@web [~]# rpm -ql wp-cli
/usr/bin/wp
/usr/share/licenses/wp-cli-2.4.0
/usr/share/licenses/wp-cli-2.4.0/LICENSE
/usr/share/man/man1/wp.1.gz
root@web [~]#

Another command that you can use is:

# repoquery -l <package-name>
root@web [~]# repoquery -l wp-cli
/usr/bin/wp
/usr/share/licenses/wp-cli-2.4.0
/usr/share/licenses/wp-cli-2.4.0/LICENSE
/usr/share/man/man1/wp.1.gz
root@web [~]#
centos logo
CentOS Logo

Resources:
WordPress Manager Change Log
rpm Linux Command
repoquery Linux Command

Leave a Reply