Useful RPM commands

Posted on October 12th, 2006 by Admin.
Categories: Linux.

To Use RPM’s :->

1. Install (Full RPM filename is must)
# rpm -ivh bind-libs-9.2.4-16.i386.rpm

2. List of files installed with a particular package.

# rpm -ql bind-utils
/usr/bin/dig
/usr/bin/host
/usr/bin/nslookup
/usr/bin/nsupdate
/usr/share/man/man1/dig.1.gz
/usr/share/man/man1/host.1.gz
/usr/share/man/man1/nslookup.1.gz
/usr/share/man/man8/nsupdate.8.gz

3. List of files from a package that is not installed
# rpm -pql bind-libs-9.2.4-16.i386.rpm

4. List dependencies
# rpm -qpR libpcap-0.8.3-7.i386.rpm
/sbin/ldconfig
/sbin/ldconfig
kernel >= 2.2.0
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.3)
openssl
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1

5. Check the integrity, use the “-K” option.

# rpm -K /iso0/Fedora/RPMS/libpcap-0.8.3-7.i386.rpm
/iso0/Fedora/RPMS/libpcap-0.8.3-7.i386.rpm: (sha1) dsa sha1 md5 gpg OK

6. List all packages installed.
#rpm -qa

7.find out which file a package belongs to.
#rpm -qf /usr/lib/libecpg.so.4.1

8. uninstall a package
# rpm -e

9. verify md5 sum so that you know it downloaded ok
# rpm -K  *.rpm

0 comments.

Leave a comment

Comments can contain some xhtml. Names and emails are required (emails aren't displayed), url's are optional.