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

Your email address will not be published.


*


Fix this before you comment on this post * Time limit is exhausted. Please reload the CAPTCHA.

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