Rpm

From Notes_Wiki
Revision as of 17:39, 25 March 2013 by Saurabh (talk | contribs)

<yambe:breadcrumb>Package_management_tools|Package management tools</yambe:breadcrumb>

rpm

Finding which package installed given file

Many times we require to know the name of the page which installed a given file. In such cases one can use:

rpm -qf <full-path-of-file>

to list the name of the rpm package.


Advantages of using package manager

Few advantages of use of package manager over installation using sources are:

  • You can find out which files are associated with a given package.
    rpm -ql <package name>
  • For a given file, you can find out which package it's associated with.
    rpm -qf <file-path>
  • You can remove all files associated with a given package, even if they're spread out over multiple directories.
    rpm -e <package-name>
  • You can know which packages are dependent on a given package
    rpm -qR <package-name> #OR
    yum deplist <package-name>
  • You can know which packages a given package depends on
    yum remove <package-name> (Can cancel with N)
  • Cryptographic security ensuring package is untampered
    Handled by yum automatically. Keys are installed in /etc/pki/rpm-gpg folder. Installation works only if package is properly signed
  • Upgrading of packages does not overwrites modified configuration files
    Results into .rpmnew or .rpmsave files
  • Packages installed by package managers can be updated using package managers easily
    yum -y update
  • Package managers ensure that one package does not overwrites file created by another package
    Results into conflicts


References

References for understanding and learning rpm and yum properly: