Package management with rpm and dpkg
 

Package management with rpm and dpkg


rpm
dpkg
Action
rpm –i filename.rpm dpkg -i filename.deb install
rpm –U filename.rpm dpkg -i filename.deb update
rpm –e pkgname dpkg -P pkgname erase
rpm –q pkgname dpkg -l pkgname query
rpm -qa dpkg --get-selections list all packages
rpm -qi pkgname dpkg -p pkgname show long description of package
rpm -qf filename dpkg -S filename search for package owning file
rpm -ql pkgname dpkg -L pkgname List files owned by package
yum search pattern apt-cache search pattern Search for packages associated with pattern

Note: The “v” and “h” switches can also be useful as well with rpm. “v” stands for verbose and gives you a bit more information. “h” draws hash marks to the screen to tell you how far you are through an install. i.e. “rpm –ivh filename.rpm”