RPM (Redhat Package Manager) is an powerful package management utility build for the Redhat based system. Which is responsible for the create distributable packages for your applications. It also used for the installing, updating and remove of packages from any Redhat based systems.
This tutorial, will help you to understand about uses of rpm command line utility. After reading this you will understand the installation, updation or removal of RPM packages from your system.
Syntax
How to Install .rpm File
Use rpm command to install any packages on Redhat based systems. For install a package use -i command line switch followed with package path on your system.
rpm -i package-1.2.3.rpm
The above command do not search for required dependencies of the packages. If the dependencies are not installed on your system, the above command will fail.
If your system is connected with Internet, Use YUM or DNF package manager to install downloaded rpm file. This will help you to install dependencies required for the package.
yum localinstall package-1.2.3.rpm
## Using yum command dnf localinstall package-1.2.3.rpm
## Using dnf package
Upgrade .rpm Package
Use “-U” command line switch to upgrade the current packages installed on your system. This will also install package if package is not already installed.
rpm -U package-1.2.3.rpm
Remove .rpm Package
In case if we need to remove any package use -e command line switch with the package name.
rpm -e package
Leave a Reply