-*- mode: indented-text; mode: auto-fill -*- file: RPM-quickref.txt Time-stamp: <2002-08-09 13:21:46 roel> Note that rpm options are sometimes awkwardly position-dependent: rpm -qi has nothing to do with rpm -i, so what would -q -i do? Information about installed packages is stored in a local RPM database, usually in /var/lib/rpm. If you installed the whole of the RPM database during RedHat installation, info about uninstalled packages will be there too. Most essential -------------- * What packages have I installed? rpm -qa * What files are in installed package foobar? rpm -ql foobar * What files are in package file foobar-1.2.3.rpm? rpm -qlp foobar-1.2.3.rpm * To which package belongs file /lib/libyadda3.so.1.2.3 ? rpm -qf /lib/libyadda3.so.1.2.3 * What the heck is package 'fudge' supposed to do? When did I install it? rpm -qi fudge # Or, to query fudge-1.2.3.rpm: rpm -qip fudge-1.2.3.rpm * Is package fnups still complete and untampered with, as far as the local rpm database knows? rpm --verify fnups * Is package fnups still ok, as compared to its native package file? (use this if you suspect damage to the local rpm database) rpm --verify -f fnups-1.2.3.rpm * is file /etc/fnupsrc still unchanged? rpm --verify -f /etc/fnupsrc * Where the heck is the documentation of package gnopeless-mess? rpm -ql --docfiles gnopeless-mess Slightly hairier dependency checking ------------------------------------ * What packages need package libeverything? rpm -q --whatrequires libeverything # Note: doesn't seem to work with -f * That's not enough. Some other packages may need only a single file or capability from libeverything. So I'm still not sure if I can throw it away. I've got to ponder on this. I think you need to frobnicate a pipeline or script for this, doing cut, sort,uniq or such. * What packages or capabilities are needed by libeverything? rpm -q --requires libeverything # Perhaps more useful with a package file: rpm -qp --requires libeverything-1.2.3.rpm