LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-20-2014, 08:08 AM   #1
biswapalai
LQ Newbie
 
Registered: Apr 2014
Posts: 3

Rep: Reputation: Disabled
Yum & rpm


How can i know which rpm package is installed either by rpm or yum ?
 
Old 04-20-2014, 11:17 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,919

Rep: Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689Reputation: 3689
Quote:
Originally Posted by biswapalai View Post
How can i know which rpm package is installed either by rpm or yum ?
You don't tell us what version/distro of Linux you're using, or if you want to do this from the command-line or the GUI, but did you try reading the man pages for both the rpm and yum commands???

"rpm -qa" will give you a start. Read the man pages on yum.
 
Old 04-20-2014, 11:38 AM   #3
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,162

Rep: Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223
To find if you have a particular program, like opera, you can use either of
rpm -q opera
whereis opera

The form "rpm -qi" tells you a lot about the program. You could use
yum list installed opera
but yum will download all the information to update your records of the repository before answering the question.

Of course, you could just use the gui front end provided, like packagekit or apper.
 
Old 04-20-2014, 11:48 AM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Note that yum is just a front end to RPM, so both of them ultimately work off the same package database. As far as I know, there's no way to tell whether a package was installed by the rpm command vs. the yum command.
 
Old 04-21-2014, 08:04 PM   #5
ziphem
Member
 
Registered: Feb 2004
Location: US / EU
Distribution: Fedora 20
Posts: 153

Rep: Reputation: 18
The cheater way to find out whether you've installed with Yum or RPM is to see if the install was logged in yum.log. So, when you find the name of the program you want to check was installed, do:

Quote:
sudo grep -i <package name> /var/log/yum.log
(though be sure it's not log rotated out, if so, check the other logs, too).

If it's not there, it won't have been installed by Yum. To check whether it was installed by RPM, do:

Quote:
rpm -qa <package>
If it's not there, then I imagine it's not installed.

Last edited by ziphem; 04-21-2014 at 08:07 PM. Reason: Unnecessary GREP syntax, added note about yum logs rotated out, and corrected a typo
 
1 members found this post helpful.
Old 04-21-2014, 10:41 PM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
I think the yum.log gets rotated occasionally, so checking there might not be 100% reliable, but it's better than nothing.

To the OP: why do you care how a package was installed? If you tell us what problem you're trying to solve, we might be able to help further.
 
Old 04-22-2014, 07:48 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
As btmiller points out, yum is just a front-end to rpm, so checking the yum.log or using 'rpm -aq ...' just shows if those tools installed it.
You can't tell the difference between yum/rpm ...
 
  


Reply


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
[SOLVED] rpm & yum 1300 Linux - Newbie 10 01-23-2013 11:05 AM
Lvm, nfs, raid0&5, linux networking, crontab, yum & rpm packages job description linux_learner12 Linux - Newbie 2 10-02-2012 07:40 AM
Rpm & yum jgireeshj Linux - Software 1 11-17-2010 02:20 AM
How to save a rpm downloaded & installed by "yum install xxx.rpm" command shashi1234567 Linux - Networking 3 12-25-2009 11:49 AM
Rpm & Yum naziboy Linux - Software 5 10-05-2007 02:27 PM


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

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