When should you use rpm command?

The rpm command is a powerful tool used on Linux systems, particularly those based on Red Hat, for managing software packages. It allows users to install, uninstall, update, and query software packages in the RPM (Red Hat Package Manager) format. You should consider using the rpm command in the following scenarios:

  • When you want to install a specific version of a software package that is not available in the system's repositories.
  • When you need to remove an application that was installed manually.
  • When you want to verify package files to ensure they are installed correctly or to check for integrity issues.
  • When you want to view detailed information about installed packages, including their dependencies.
  • When you need to upgrade an existing package without the dependency resolution that comes with higher-level package management tools.

Here’s an example of how to use the rpm command to install a package:

rpm -ivh package-name.rpm

In this command:

  • -i: Installs the specified package.
  • -v: Enables verbose mode, providing more details during installation.
  • -h: Displays the progress of the installation using hash marks.

rpm command Linux package management Red Hat Package Manager install RPM packages