RPM stands for Red Hat Package Manager. RPM is a powerful Package Manager for Red Hat, Suse and Fedora Linux. It can be used to build, install, query, verify, update, and remove/erase individual software packages. A Package consists of an archive of files, and package information, including name, version, and description.
- Files end in the .rpm extension
- RPM files are the preferred Linux installation files according to the LSB (Linux Standard Base)
- Two different types of RPM files:
- RPM – contains the compiled code
- SRPM – contains the source code for a particular application
- RPM package names are constructed like this:
name-version-release.architecture.rpm
openssh-5.3p1-52.el6_1.2.x86_64.rpm
- Architecture comes in three types:
- I386 for 32 bit system
- x86_64 for 64 bit systems
- noarch – platform independent software
- RPM packages contain the following items:
- SPEC file – A file that ends in the .spec file extension, contains the information necessary to create the RPM package
- The application or libraries that are to be installed
- Any documentation (such as man pages ) that come with the package
- Any configuration files that come with the application
- Package installation is stored in the RPM database. RPM database is located at: -/var/lib/rpm
RPM Commands
list of all installed packages
# rpm -qa
list of all recently installed packages
# rpm -qa –last
Query a particular Package
# rpm -qa packagename
Information about Package
# rpm -qi packagename
Documentation files of Package
# rpm -qd packagename
Dependencies a rpm file has
# rpm -qR packagename
list of configuration file for a Package
# rpm -qc packagename
list of all the Files in a Package
# rpm -qpl packagename.rpm
To Install the package
# rpm -ivh packagename.rpm
To Upgrade package
# rpm -Uvh packagename.rpm
Forcefully install package
# rpm -ivh –nodeps packagename.rpm
Uninstall package
# rpm -e packagename
Forcefully uninstall package
# rpm -e –nodeps package
Erase/remove/ an installed package
# rpm -ev package
Erase/remove/ an installed packagewithout checking for dependencies
# rpm -ev –nodeps package