LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Yum & rpm (https://www.linuxquestions.org/questions/linux-newbie-8/yum-and-rpm-4175502354/)

biswapalai 04-20-2014 07:08 AM

Yum & rpm
 
How can i know which rpm package is installed either by rpm or yum ?

TB0ne 04-20-2014 10:17 AM

Quote:

Originally Posted by biswapalai (Post 5155939)
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.

DavidMcCann 04-20-2014 10:38 AM

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.

btmiller 04-20-2014 10:48 AM

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.

ziphem 04-21-2014 07:04 PM

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.

btmiller 04-21-2014 09:41 PM

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.

chrism01 04-22-2014 06:48 AM

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 ...


All times are GMT -5. The time now is 08:42 AM.