rpm --querytags
rpm -q --whatprovides <filename> Example: rpm -q --whatprovides /usr/bin/lsscsi lsscsi-0.23-2.el6.x86_64
rpm -ql *package*
rpm -qlp *package*
rpm -q --scripts *package*
rpm -qp --scripts *package*
List packages from 3 party vendors (Not Red Hat).
rpm -qa --qf '%{NAME} %{VENDOR}\n' | grep -v "Red Hat, Inc."
rpm -qa --qf '%{NAME} %{SIGGPG:pgpsig} %{SIGPGP:pgpsig} \n'
rpm -qa --last rpm -qa --queryformat '%{installtime} (%{installtime:date}) %{name}\n' | sort -n
rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n'
rpm -e --allmatches gpg-pubkey-<pub signature>
rpm -Kv <RPM package>
rpm -Kv zsh-4.3.10-4.1.el6.x86_64.rpm zsh-4.3.10-4.1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: OK Header SHA1 digest: OK (65b8120096b3ffdec9f34767883a7e343442b388) V3 RSA/SHA256 Signature, key ID fd431d51: OK MD5 digest: OK (0fd7878f63df3b48b5d0099ea9c81717)
If the RPM package is not signed the output will be missing the SHA/RSA signatures.
rpm -Kv TIVsm-API64.x86_64.rpm TIVsm-API64.x86_64.rpm: Header SHA1 digest: OK (07dad9f7be72b5a322c355038589b75dbf5038b6) MD5 digest: OK (67ae54c20e4195c48bb3c7a90b7655db)
The SHA1 & MD5 digest information is the cheksums.
rpm --addsign <RPM package>
rpm -qip <package.rpm>
rpm -qip zsh-4.3.10-4.1.el6.x86_64.rpm Name : zsh Relocations: (not relocatable) Version : 4.3.10 Vendor: Red Hat, Inc. Release : 4.1.el6 Build Date: Tue 08 Dec 2009 09:35:26 PM CET Install Date: (not installed) Build Host: ls20-bc2-13.build.redhat.com Group : System Environment/Shells Source RPM: zsh-4.3.10-4.1.el6.src.rpm Size : 5011302 License: BSD Signature : RSA/8, Mon 16 Aug 2010 10:35:42 PM CEST, Key ID 199e2f91fd431d51 Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> URL : http://zsh.sunsite.dk/ Summary : A powerful interactive shell Description : The zsh shell is a command interpreter usable as an interactive login shell and as a shell script command processor. Zsh resembles the ksh shell (the Korn shell), but includes many enhancements. Zsh supports command line editing, built-in spelling correction, programmable command completion, shell functions (with autoloading), a history mechanism, and more.
rpm -qi *package*
rpm2cpio httpd-2.2.3-31.el5_4.2.x86_64.rpm | cpio -idmv
rpm2cpio logrotate-1.0-1.i386.rpm |cpio -ivd etc/logrotate.conf
yum --disablerepo="*" --enablerepo="google" list available
This applies to both installed packages and just available packages. Requires yum-utils.
repoquery -l *package*
yum deplist <package>
You might want to download packages without installing them.
Make sure yum-downloadonly plugin is installed
yum install yum-downloadonly
Update system but only download packages do not install them
yum update -y --downloadonly
Default download cache is /var/cache/yum/. This cn be overidden with –downloaddir option
Getting conflict errors between 32bit and 64 bit packages when doing yum update
Transaction Check Error:
file blablabla from install of hal-0.5.8.1-62.el5.i386.rpm conflicts with file from package hal-0.5.8.1-62.el5.x64.rpm
rpm -Uvh --force /var/cache/yum/rhel-x86_64-server-5/packages/hal-0.5.8.1-62.el5.i386.rpm
Now re-run yum update. Now everything works fine.