Saturday, March 22, 2008

Common Pkg And RPM Command Cross Reference

Hey there,

Today, I thought I'd put out a little summary, if you will, to wrap up all the pkg-to-rpm-to-pkg type articles we've been dealing with for the last few weeks and try to boil it down to a quick cross reference. This way you can have, at a glance, the basic information you need to manipulate both Solaris Unix pkg files and Linux RedHat RPM's.

You can find more detailed information, if you prefer, in our previous posts on working with Linux RPM's and building Solaris packages. I have yet to write a post on working specifically with pkg files (just lots of different aspects), but I suppose I ought to now, huh? ;)

This will be pretty straightforward, with a format of:

What We Want To Do: RPM command - PKG command
>--- With PKG and RPM being the actual pkg and RPM names

Enjoy, and I hope this helps save you some time digging around We will most likely look at the apt and yum equivalents of these commands very soon, as well :)

Show package info: rpm -qi RPM - pkginfo -l PKG
Install package: rpm -ivh RPM_FILE - pkgadd -d PKG_FILE
Remove package: rpm -e RPM - pkgrm PKG
List the package that owns a particular FILE: rpm -qf FILENAME - pkgchk -l -p FILENAME
List all files in an already installed package: rpm -ql RPM - pkgchk -l PKG
List all files in an uninstalled package FILE: rpm -qlp RPM_FILE - pkgchk -l -d PKG_FILENAME
List all packages installed on your system: rpm -qa - pkginfo
Check that all files from a package are installed correctly: rpm -V RPM - pkgchk PKG
Check that all files from all packages are installed correctly: rpm -Va - pkginfo|awk '{print $2}'|xargs pkgchk
Check that a package FILE is OK before installing: rpm -K RPM_FILE - pkgchk -d PKG
Fix an altered package installation: rpm --setperms/--setugids RPM - pkgchk -f PKG


, Mike