Practical RPM

Intermidiate usage

Listing all installed packages

$ rpm -qa | sort

Selective listing of installed packages
Sometimes one may need to find all installed packages that match some pattern, like “kernel” or “vim”. This task can be completed using the following command.

$ rpm -qa | grep -i vim

Asking questions about files
If you do not recognize a file on your system, then RPM can be queried to inform you of any package that installed that file.

$ rpm -qf /usr/bin/vim

Sometimes you would want to see a list of all files installed by certain package.

$ rpm -ql vim-enhanced

With a little more grep magic you can find out about all programs that the package in question installed.

$ rpm -ql vim-enhanced | grep bin

Leave a Comment