Data Networking Blog
Blog for Admins

RPM Package Manager

Standard

According to the rpm man page description:

rpm  is  a  powerful Package Manager, which can be used to build, install, query, verify, update, and erase individual software packages.  A package consists of an archive of files and meta-data used to install and erase the archive files. The meta-data includes helper scripts,  file  attributes, and  descriptive  information about the package.  Packages come in two varieties: binary packages, used to encapsulate software to be installed, and source packages, containing the source code and recipe necessary to produce binary packages.”

The only problem with rpm is that when you install a package using rpm then it won’t resolve any dependencies automatically. So if you try to install a package that is missing dependencies then rpm will check and report the problem but it won’t try to install the dependency by itself which makes it not so ideal for installing software in general.

In this post, I will list some common and useful options for rpm to query and get information about installed packages, configuration files etc.

This will show you all the packages installed on your system. You can find information about a specific package by providing the name of the package to rpm command like below:

This shows us the package, version number and build etc. To see what configuration files are in use by a package use the -c option.

To get a list of all files for a package use the -l option.

If you find a configuration file and you are not sure which package uses it then you can use rpm -qf to easily find the package name. I want to know which package uses numad.conf in my /etc directory.

And I can find more information about this package by using -i with query.

You can query an uninstalled or not installed package if you have it downloaded on your computer or if you know the HTTP/FTP url. If you provide the –script with this option then you can also see what scripts will be run when this package is installed.

Also, one more useful switch with rpm is -d option. This will help you find documentation for a given package.

 

July 5, 2017 Linux, RHCSA Jd
Font Size
Decrease Size Default Size Increase Size
Select Skin
Select Underlay Background
Select Overlay Background
Scheme Switcher Toggle