Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-06-2015, 10:55 AM   #1
Senior Member
Registered: Jan 2004
Location: SATX
Distribution: RHEL/CentOS
Posts: 1,220
Blog Entries: 4

Rep: Reputation: 132Reputation: 132
rpm query format question

I'm trying to run rpm query format commands from the CLI, however I'm not able to get anything to return from them.

Here are two examples:

I believe this one looks for third party packages that doesn't come from Red Hat. However do I have to populate something where it says Name or Vendor?

rpm -qa --qf '%{NAME} %{VENDOR}\n' | grep -v "Red Hat"
The other one is

rpm -qa --queryformat '%{name-%{version}-%{release} %{size}\n'
Old 07-06-2015, 11:39 AM   #2
Senior Member
Registered: Oct 2005
Distribution: SLES 12
Posts: 1,781

Rep: Reputation: 127Reputation: 127
Old 07-08-2015, 07:30 PM   #3
Senior Member
Registered: Jan 2004
Location: SATX
Distribution: RHEL/CentOS
Posts: 1,220
Blog Entries: 4

Original Poster
Rep: Reputation: 132Reputation: 132

I got the first query to work. It has to be ran on a RHEL server where there are third party RPMs installed

[user@server ~]$ rpm -qa --qf '%{NAME} %{VENDOR}\n' | grep -v "Red Hat"
gpg-pubkey (none)
oracleasm-support Oracle Corporation
oracleasm-2.6.18-404.el5 Oracle Corporation
jdk1.8.0_25 Oracle Corporation
oracleasmlib Oracle Corporation
gpg-pubkey (none)
The other one, I was missing a } after name

rpm -qa --queryformat '%{name}-%{version}-%{release} %{size}\n'


query, red hat, rpm

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Which path to use to query rpm to determine which RPM to install? elitt2 Red Hat 4 10-08-2007 01:18 PM
rpm Query scbops Linux - General 1 08-01-2006 07:04 AM
how to query rpm on cd? binary_0011 Linux - Newbie 2 04-15-2006 09:34 AM
rpm query bong.mau Linux - General 2 11-05-2005 10:20 AM
rpm query lucky123 Linux - Newbie 1 04-21-2005 01:41 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration