Linux rpm is a free program that can be used on Ubuntu to manage rpm packages, among other things. The Linux command offers numerous options to install, analyze and update packages.

What is Linux rpm?

Linux rpm is a command line tool used to manage rpm packages. These are used in par­tic­u­lar by man­u­fac­tur­ers of com­mer­cial software. They are not orig­i­nal­ly intended for Linux. rpm stands for “Red Hat Package Manager” and has been developed and dis­trib­uted as free software by the US company Red Hat since 1997. Today Linux rpm is an in­de­pen­dent project with a GPL license. Its main tasks are to install and uninstall software, manage con­fig­u­ra­tion files and take de­pen­den­cies into account.

How does the Linux rpm command work?

Before the rpm command can be used in Linux, the package man­age­ment must be installed. It should not be used in addition to dpkg, since the two man­age­ment systems may not work com­pat­i­bly with each other. You can install rpm using the following command:

$ sudo apt-get install rpm
bash

Once installed, the program can be used with the rpm command.

What’s the syntax of the rpm command?

The basic syntax of Linux rpm looks like this:

$ rpm [Options] [Package name]
bash

In addition to the actual command, you can use the options to determine the tasks the program should perform. It’s also possible to process several packages with one command. These are simply written one after the other separated by a space character.

What are the options with rpm?

Linux rpm is suitable for analyzing, in­stalling, unin­stalling and searching packages, among other things. The command has numerous options, which you can view with the following command:

$ rpm --help
bash

The main options include:

  • -e or –erase: Delete an rpm package.
  • -i or –install: Install an rpm package.
  • -K or –checksig: Check the integrity of a package and thus uncover possible errors in advance.
  • -q or –query: Displays all available in­for­ma­tion about installed packages. It can be specified even further.
  • -U or –upgrade: Update an rpm package.
  • -V or –verify: Verify the integrity of a package, including missing or modified files.

Examples for using the rpm command

To help you better un­der­stand how the rpm command works, we’ll finish by showing you a few examples.

$ rpm -qi Paket1.rpm
bash

This displays a de­scrip­tion of the package.

$ rpm -qa
bash

Use this command to get a listing of all installed rpm packages.

$ rpm -i Paket1.rpm Paket2.rpm
bash

Install both packages.

$ rpm -e Paket1.rpm
bash

So how do you uninstall package1.rpm? Unin­stalling rpm packages you installed with Linux rpm can be done using the same program.

Go to Main Menu