RH: List installed packages without version numbers
Sometimes it is pretty handyto have a list of installed packages without
the version numbers ( as input for a script ).
Normally you get this output :
# rpm -q openssh-clients
openssh-clients-5.3p1-94.el6.x86_64
Use this command to get a list without version numbers :
# rpm -q openssh-clients –qf “%{NAME}\n”
openssh-clients
It can also be done with sed on Linux :
$ rpm -q openssh-clients | sed ‘s/-[0-9].*$//’
openssh-clients
Leave a comment