RPM Package Manager (RPM) Interview Questions & Answers

  1. Question 1. How To Install Rpm In Linux?

    Answer :

    #rpm –ivh package name

    // to install a RPM we need to use -i option.

  2. Question 2. How To Remove A Rpm?

    Answer :

    #rpm -e package name

    // to remove a RPM file we need to use -e option.

  3. Networking Interview Questions

  4. Question 3. How To Upgrade A Rpm?

    Answer :

    #rpm -Uvh package name

    // To upgrade a RPM we need to use -U option.

  5. Question 4. How To Check Installed Rpm?

    Answer :

    #rpm -qa package name

    // To list or find an installed RPM we need to use -q option.

  6. Networking Tutorial

  7. Question 5. How To List All Files Of An Installed Rpm Package?

    Answer :

    #rpm -ql package name

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

  8. FTP Script Interview Questions

  9. Question 6. How To Install A Rpm Package Without Dependencies?

    Answer :

    #rpm -ivh –nodeps packagename

    // To install a RPM without any dependencies we need to use –nodeps option.

  10. Question 7. How To Check Dependencies Of Rpm Package Before Installing?

    Answer :

    #rpm -qpR package name

    // To check the dependency 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.

  11. Unix/Linux Tutorial
    Linux File Systems Interview Questions

  12. Question 8. How To Check An Rpm Signature For A Package?

    Answer :

    #rpm –checksig packagename.rpm

    // We need to use the option –checksig for signature verification.

  13. Question 9. How To List Recently Installed Rpm Packages?

    Answer :

    #rpm -qa –last

    // To list recently installed RPM we need to use –last option.

  14. Ansible (software) Interview Questions

  15. Question 10. How To Query A File That Belongs Which Rpm Package?

    Answer :

    #rpm -qf /etc/passwd

    // To find a file owned by which package.

  16. Unix makefile Tutorial

  17. Question 11. Get The Information Of Rpm Package Before Installing?

    Answer :

    #rpm -qip packagename.

  18. Advanced Linux Interview Questions

  19. Question 12. How To Verify A Rpm Package?

    Answer :

    #rpm -Vp

    // To verify the installed RPM.

  20. Networking Interview Questions

  21. Question 13. How To List All Imported Rpm Gpg Keys?

    Answer :

    #rpm -qa gpg-pubkey.

  22. Question 14. How To Remove An Rpm Package Without Dependencies?

    Answer :

    #rpm -ev –nodeps package name // same –nodeps option we need to use.

  23. Question 15. How To Rebuild Corrupted Rpm Database?

    Answer :

    # cd /var/lib

    # rm __db*

    # rpm –rebuilddb

    # rpmdb_verify Packages

  24. Unix/Linux Interview Questions

  25. Question 16. How To Check The Installed Software(rpm’s) On Red Hat Linux?

    Answer :

    rpm -qa package_name (or) rpm -qa |grep package_name

    Ex:

    [root@mylinz ~]# rpm -qa yum

    yum-3.2.27-14.el6.noarch

    [root@mylinz ~]# rpm -qa |grep yum

    yum-rhn-plugin-0.9.1-5.el6.noarch

    yum-utils-1.1.26-11.el6.noarch

    yum-metadata-parser-1.1.2-14.1.el6.x86_64

    yum-3.2.27-14.el6.noarch

    PackageKit-yum-0.5.8-13.el6.x86_64

    PackageKit-yum-plugin-0.5.8-13.el6.x86_64

    [root@mylinz ~]#

  26. Question 17. How To Install Specific Software Package Using Rpm Command On Redhat Linux?

    Answer :

    rpm –ivh package name

  27. Oracle Retail Merchandising System Interview Questions

  28. Question 18. How To Remove The Software Package From On Red Hat Linux?

    Answer :

    rpm -eV package_name

  29. FTP Script Interview Questions

  30. Question 19. How To Upgrade The Existing Red Hat Package Using Rpm Command?

    Answer :

    rpm -Uvh package_name

  31. Question 20. How To Display The List Of Installed Software Package’s Files?

    Answer :

    rpm -ql package_name 

    Ex:

    [root@mylinz ~]# rpm -ql yum-rhn-plugin-0.9.1-5.el6.noarch

    /etc/yum/pluginconf.d/rhnplugin.conf

    /usr/share/doc/yum-rhn-plugin-0.9.1

    /usr/share/doc/yum-rhn-plugin-0.9.1/LICENSE

    /usr/share/locale/ar/LC_MESSAGES/yum-rhn-plugin.mo

    /usr/share/locale/as/LC_MESSAGES/yum-rhn-plugin.mo

    /usr/share/locale/bg/LC_MESSAGES/yum-rhn-plugin.mo

    /usr/share/locale/bn/LC_MESSAGES/yum-rhn-plugin.mo

  32. Unix Shell Scripting Interview Questions

  33. Question 21. How To Find Files Belongs To Which Rpm Package?

    Answer :

    rpm -qf file_location  

    Ex:

    [root@mylinz ~]# rpm -qf /etc/yum.conf

    yum-3.2.27-14.el6.noarch

    [root@mylinz ~]#

  34. Question 22. How To Display List Of Configuration Files For Specific Package?

    Answer :

    rpm -qc package_name

    Ex:

    [root@mylinz ~]# rpm -qc yum

    /etc/logrotate.d/yum

    /etc/yum.conf

    /etc/yum/version-groups.conf

    [root@mylinz ~]#

  35. Question 23. How To Get The List Of Dependencies For Specific Rpm File?

    Answer :

    rpm -qpR rpm_file

    Ex:

    [root@mylinz ~]# rpm -qpR nautilus-sendto-2.28.2-3.el6.x86_64.rpm

    /bin/sh

    /bin/sh

    /bin/sh

    GConf2

    GConf2

    GConf2

    libORBit-2.so.0()(64bit)

    libatk-1.0.so.0()(64bit)

    libbonobo-2.so.0()(64bit)

    libbonobo-activation.so.4 ()(64bit)

  36. yum Interview Questions

  37. Question 24. How To Get The List Of Dependencies For Specific Package?

    Answer :

    rpm -qR package_name

    Ex:

    [root@mylinz ~]# rpm -qR yum

    /usr/bin/python

    config(yum) = 3.2.27-14.el6

    pygpgme

    python >= 2.4

    python(abi) = 2.6

    python-iniparse

    python-sqlite

    python-urlgrabber >= 3.9.0-8

    rpm >= 0:4.4.2

    rpm-python

    rpmlib(Compressed Filenames) <= 3.0.4-1

    rpmlib(File Digests) <= 4.6.0-1

    rpmlib(PartialHardlinkSets) <= 4.0.4-1

    rpmlib(PayloadFilesHavePrefix) <= 4.0-1

    yum-metadata-parser >= 1.1.0

    rpmlib(PayloadIsXz) <= 5.2-1

    [root@mylinz ~]#

  38. Linux File Systems Interview Questions

  39. Question 25. How To Remove The Package Without Checking The Dependencies On Red Hat Linux?

    Answer :

    rpm -ev –nodeps package_name