RPM query installed packages in Centos RHEL and Fedora

In this tutorial, I using the rpm command to query lists the packages installed on the system. How do I use “rpm query installed packages in Centos, RHEL, and Fedora“. Linux the essential for DevOps Roles.

RPM query installed packages

List of the only package installed your system.

$ rpm -qa --qf "%{NAME}\n"

Example, List of the package installed on “Server A”. After then, How to install the package from “Server A” for “Server B”

Server A $ rpm -qa --qf "%{NAME}\n" > packaged.list
Server B # xargs yum -y < packaged.list

Display the package names, versions and releases with this command

[huupv@huupv devopsroles]$ rpm -qa --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n'

The screen output terminal as below

RPM query installed packages in Centos RHEL and Fedora

Conclusion

Thought the article, How to use “RPM query installed packages in Centos RHEL and Fedora” as above. I hope will this your helpful. Thank you for reading the DevopsRoles page!

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created DevopsRoles.com site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.