RPM stands for Red Hat Package Manager. There are a variety of distributions besides Red Hat that use RPM to manage packages including Fedora, Mandriva, SUSE, CentOS, and Yellow Dog Linux among others. RPM uses a database to keep track of what packages have been installed on the system and where they are located. This functionality allows you to easily query, install, upgrade, and remove packages from your system.
RPM packages are distributed in the following format “<package>.<version>.<architecture>.rpm”
The rpm command requires root privileges so switch to root or use sudo.
Before installing a package you can check the package information.
# rpm -qi mypackage.1.2.3.x86_64.rpm
You can also list the files that will be installed.
# rpm -ql mypackage.1.2.3.x86_64.rpm
Once you are sure about the contents of the package you can install an RPM package with the ‘-i‘ option.
# rpm -i mypackage.1.2.3.x86_64.rpm
To upgrade a package that is already installed.
# rpm -U mypackage.2.0.0.x86_64.rpm
To remove a package you only need to provide the package name and not the version or rpm suffix.
# rpm -e mypackage
To view all the installed packages on your system.
# rpm -qa
If you want to see more output you can increase the verbosity by adding the ‘-v‘ option to any of these commands. To raise it even further you can add ‘-vv‘.
Comments (0)
Trackbacks (0)