Rpm Package Management Quick Reference
An updated version of this article at: RPM Package Management Quick Reference
RPM tool
rpm tool deals with rpm packages directly, but cannot deal with packages placed in a repository. Zypper, Yum,... tools deal with repositories.
$rpm -q package_name
#e.g rpm -q subversion Query if a package is installed.$rpm -qf "*/bash"
#find which package owns that file.#rpm -e package_name
#deletes a package.$rpm -qi package_name
# shows info about a package.$rpm -ql package_name
# list files contained in package_name#rpm -i package.rpm
# installs a rpm file package.#rpm -i --force package.rpm
# forces package.rpm installation.#rpm -qpl foo.rpm
# shows the files in foo.rpm file package.$rpm -q --scripts foo
# shows installation and uninstallation scripts for foo package.$rpm -qR foo
# shows which dependencies foo package requires.ZYPPER (OpenSuse 10.3 and up)
#zypper install foo
# installs foo package from repository.#zypper remove foo
# removes a package. e.g: zypper remove python-twisted-conch $zypper info python-twisted-conch
# shows package info $zypper search python
# searchs for packages matching python.#zipper ref && zipper dup
# refresh repositories and then update the system.