We can use -qf option query file with rpm command on a configuration file. We will use -ql option with rpm command to show all the files of this installed package on the system. We will use -qc option with rpm command to displays configuration file related to package. We will use -qd option query documentation with rpm command to list only documentation files.
In Linux we can use wc command to count so we can pipe it rpm query command to get total count of installed packages. However, you can't display extra packages properties and it's difficult to parse with a script. The tool repoquery from the package yum-utils is the tool, but it isn't installed by default. Obviously, you need to determine if the Vendor header of your repository is unique among different repositories.
Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Learn more. Asked 10 years, 3 months ago. Active 7 months ago. Viewed 81k times. Improve this question. Lorin Hochstein Lorin Hochstein 7, 17 17 gold badges 47 47 silver badges 56 56 bronze badges. Add a comment. Active Oldest Votes.
Improve this answer. David Schwartz David Schwartz 4, 19 19 silver badges 27 27 bronze badges. Use the rpm ——help command for more options, or refer to the documentation.
Yum-utils is a software package that adds functionality to the standard YUM package manager. The yum-utils package uses yum repositories to pull information. Now you understand how to list and filter installed packages on CentOS. Introduction Managing a CentOS operating system often means knowing the software packages that are installed. Was this article helpful? Make sure you trust the source before you install.
The -i switch tells the package manager you want to install the file. Alternately, you can use the yum package manager to install. The localinstall option instructions yum to look at your current working directory for the installation file. Normally, yum looks to your enabled software repositories for new software packages to install.
Unlike many Linux tools, DNF is not a set of initials. It is merely the next evolution of the yum package manager. The -e option instructs RPM to erase the software. Check RPM Dependencies. If there are any missing dependencies, you can install them from the standard repositories using yum or dnf. If your software requires other non-standard software, it will often be noted in the installation instructions.
0コメント