Linux and Shell Programming

0 of 30 lessons complete (0%)

Module 4 Software Management

Installing a Package using RPM

  • Installing an RPM package:
sudo rpm -ivh <package-name>.rpm

-i: Install the package.
-v: Verbose mode. Provides detailed information about the installation process.
-h: Show the progress of the installation with a hash mark (#) for each step.

This command installs the <package-name>.rpm package.

Output:

Preparing... ################################# [100%] Updating / installing... 1:<package-name> ################################# [100%]
  • Verifying installed packages:
rpm -q <package-name>

-q: Query mode. Checks whether the package is installed.

This command checks whether the package named package-name is installed.

Output:

<package-name>-<version>-<release>.<architecture>
  • Removing an RPM package:
sudo rpm -e <package-name>

-e: Erase the package.

This command removes the package named package-name.

Output:

Preparing... ################################# [100%] 1:<package-name> ################################# [100%]