3

Title pretty much sums it up, but I'm looking for an rpm or yum command to see if an installed package was installed from the repos (if repo, which repo?), or manually.

4
  • 2
    See: this question and this question for a starting point
    – cyberx86
    Feb 15, 2012 at 1:26
  • Totally misread the question, doh. Deleting my answer. Seems like Janne Pikkarainen's answer in @cyberx86 first suggestion would work for you. Feb 15, 2012 at 14:08
  • Janne Pikkarainen's answer is in the second question.
    – Mei
    Feb 15, 2012 at 23:38
  • What version of RPM and YUM are you using? Running YUM 3.2.22-37 and RPM 4.4.2.3-22 (RHEL 5) doesn't show the From Repo line mentioned by Janne. You could try checking /var/log/yum.log* files for an RPM; if it's not there it was not installed by YUM. Watch out for initial installs, though: things installed from CDROM won't be in the YUM logs I don't think.
    – Mei
    Feb 15, 2012 at 23:44

1 Answer 1

0

rpm -qai |grep

example:

rpm -qai |grep -9 wget
restore individual files (or all of the files) from that archive. Tar
can also be used to add supplemental files to an archive and to update
or list files in the archive. Tar includes multivolume support,
automatic archive compression/decompression, the ability to perform
remote archives, and the ability to perform incremental and full
backups.

If you want to use tar for remote backups, you also need to install
the rmt package.
Name        : wget                         Relocations: (not relocatable)
Version     : 1.12                              Vendor: CentOS
Release     : 1.4.el6                       Build Date: Wed Aug 25 04:53:32 2010
Install Date: Sun Jul 10 18:23:54 2011         Build Host: c6b3.bsys.dev.centos.org
Group       : Applications/Internet         Source RPM: wget-1.12-1.4.el6.src.rpm
Size        : 1877597                          License: GPLv3+ and GFDL
Signature   : RSA/8, Sun Jul  3 01:05:14 2011, Key ID 0946fca2c105b9de
Packager    : CentOS BuildSystem <http://bugs.centos.org>
URL         : http://wget.sunsite.dk/
Summary     : A utility for retrieving files using the HTTP or FTP protocols
Description :
GNU Wget is a file retrieval utility which can use either the HTTP or
FTP protocols. Wget features include the ability to work in the
background while you are logged out, recursive retrieval of
directories, file name wildcard matching, remote file timestamp
storage and comparison, use of Rest with FTP servers and Range with
HTTP servers to retrieve files over slow or unstable connections,
support for Proxy servers, and configurability.
2
  • that's a dirty grep but i added the -9 so you could see the entire wget entry, there is probably another flag to just show for one package
    – jemmille
    Mar 15, 2012 at 1:20
  • Use the package name (rpm -qa for a list) instead of grep: rpm -qi wget
    – basic6
    Aug 2, 2016 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.