How to Install Local Package Using RPM [A Quick Guide]

RPM, short for Red Hat Package Manager, serves as a primary tool within Red Hat-based distributions like RHEL, Fedora, and CentOS. This package management system facilitates effortless installation, updates, and removals of .rpm software packages within Unix/Linux environments. While YUM and DNF package managers are also prevalent, RPM remains useful for its control over installation. Today I will show you how to install a local .rpm package using the rpm command in Red Hat-based distributions.

Key Takeaways

  • Install the local package using rpm in Red Hat-based distributions.

Requirements

  • A Red Hat-based distribution is required.

Process Flow Chart

[Distro Used Throughout the Tutorial: RHEL 9.2]

step by step instructions on how to install local package using rpm

Steps to Install Local Package Using RPM

Installing a local app package using the rpm package manager is a very simple task in Red Hat-based Linux systems. In this guide, I will navigate you through RPM’s local package installation steps. If you want to know how to list installed packages using rpm check this fantastic article “How to List Installed Packages Using RPM”. For uninstalling an app package using rpm check this another detailed article “How to Uninstall RPM in Linux”.

Steps to Follow >

➊ Before starting, download the .rpm package file for the app you want to install. You can usually find it on the official website of the app or in third-party repositories. You can also create the .rpm file from the .deb file using the alien package.

➋ Now, run the following command in the terminal to move to the directory where the .rpm file is located:

cd Downloads/
EXPLANATION
  • cd: This command changes the current directory to the destination directory.
  • Downloads/: Name of the destination directory.

➌ After that, execute the following command to view all the files and folders in that directory:

ls
EXPLANATION
  • ls: List all files and folders of the current directory in the command line.

➍ Finally, run the following command to install your app package:

sudo rpm -i  google-chrome-stable_current_x86_64.rpm
EXPLANATION
  • sudo: Permits administrative permission.
  • rpm: Manages rpm packages in Red Hat-based distributions.
  • i: This option specifies the rpm command to install the specified app package.
  • google-chrome-stable_current_x86_64.rpm: .rpm file of the app package.

how to install .rpm local file using rpm package manager in command line interface

After installing the app package, your command line interface should look like the above image.

Conclusion

In this article, I have discussed the simplest way to install an app package from a local file using RPM in a Red Hat-based system. I hope this article has been helpful and you were able to install a package from a local file in your Linux system.

People Also Ask

How to install RPM local package with yum?
To install a local package in any Red Hat-based Linux system like RHEL, Fedora, and CentOS at first move to the download folder using cd Download/ then run sudo yum localinstall filename.rpm or you can just run sudo yum localinstall path/filename.rpm in the terminal. It will install the local package in your system using the Yum package manager.
How to use yum to install a package?
In Red Hat-based distributions yum is a very dependable package manager. You can keep an up-to-date Linux system using Yum. To install an app package using yum run sudo yum install package-name in the terminal.
How do I list yum installed packages?
To list all installed packages using yum just run yum list installed in your RPM-based distribution.
How to check installed package with RPM?
You can use rpm -qa to list all installed rpm packages. Or you can use rpm -q package_name to list a particular package.
Rate this post
Ridoy Chandra Shil

Hello everyone. I am Ridoy Chandra Shil, currently working as a Linux Content Developer Executive at SOFTEKO. I am a Biomedical Engineering graduate from Bangladesh University of Engineering and Technology. I am a science and tech enthusiast. In my free time, I read articles about new tech and watch documentaries on science-related topics. I am also a big fan of “The Big Bang Theory”. Read Full Bio

Leave a Comment