Saturday, October 5, 2013

RPM Usage in Linux

1.How to install RPM in linux ?


 #rpm –ivh packagename  // To install a RPM we need to use -i option.

2. How to remove a RPM ?


 #rpm -e packagename  // To remove a RPM file we need to use -e option.

3.How to Upgrade a RPM ?


 #rpm -Uvh packagename // To upgrade a RPM we need to use -U option.

4.How to check installed RPM?

 #rpm -qa packagename   // To list or find a installed RPM we need to use -q option.

5. How to List all files of an installed RPM package

 #rpm -ql packagename   // To list all files of installed rpm we need to use -ql ( query list) option.

6.How to Install a RPM Package Without Dependencies

 #rpm -ivh --nodeps packagename // To install a RPM without any dependencies we need to use --nodeps option.

7.How to check dependencies of RPM Package before Installing

 #rpm -qpR packagename   // To check the dependeny for a RPM we need to use -qpR option.


  -q : Query a package
  -p : List capabilities this package provides.
  -R: List capabilities on which this package depends.

8. How to Check an RPM Signature for a Package?


  #rpm --checksig  packagename.rpm    // We need to use the option --checksig for signature verification.

9. How to List Recently Installed RPM Packages


  #rpm -qa --last   // To list recently installed RPM we need to use --last option

10. How to Query a file that belongs which RPM Package


  #rpm -qf /etc/passwd         // To find a file owned by which package

11.Get the Information of RPM Package Before Installing


  #rpm -qip packagename

12. How to Verify a RPM Package


  #rpm -Vp  // To verify the installed RPM

13.How to List all Imported RPM GPG keys


  #rpm -qa gpg-pubkey*


14. How to Remove an RPM Package Without Dependencies


  #rpm -ev --nodeps packagename // same --nodeps option we need to use



No comments: