rpm: Package management system used on Red Hat-based distributions
August 9th, 2024 12:54 PM Mr. Q Categories: Command
Command: rpm
The RPM Package Manager (RPM) is a package management system used primarily on Red Hat-based distributions (such as CentOS, Fedora, and RHEL). It allows users to install, update, remove, and query software packages.
Sample Command and Output:
$ rpm
Description:
rpm
: Launches therpm
command-line tool, which provides various options for managing RPM packages on the system.
Additional Commands and Sample Outputs:
rpm -ivh package_name.rpm
: Install an RPM package. Sample Command and Output:
$ sudo rpm -ivh example-package.rpm
Preparing... ################################# [100%]
Updating / installing...
1:example-package-1.0-1.el7 ################################# [100%]
Description:
rpm -i <package_name.rpm>
: Installs the specified RPM package.-v
: Verbose mode, showing detailed output of the installation process.-h
: Display a progress hash mark for each file installed.rpm -Uvh package_name.rpm
: Upgrade an existing RPM package. Sample Command and Output:
$ sudo rpm -Uvh example-package.rpm
Preparing... ################################# [100%]
Updating / installing...
1:example-package-2.0-1.el7 ################################# [100%]
Description:
rpm -U <package_name.rpm>
: Upgrades the specified RPM package to a newer version, or installs it if it’s not already installed.-v
: Verbose mode, showing detailed output.-h
: Display a progress hash mark for each file installed.rpm -e package_name
: Remove an installed RPM package. Sample Command and Output:
$ sudo rpm -e example-package
Description:
rpm -e <package_name>
: Erases (removes) the specified RPM package from the system.rpm -qa
: List all installed RPM packages. Sample Command and Output:
$ rpm -qa
example-package-2.0-1.el7.x86_64
kernel-3.10.0-1127.el7.x86_64
vim-enhanced-8.1.2269-1.el7.x86_64
Description:
rpm -qa
: Queries (-q
) all installed packages (-a
), listing their full package names.rpm -q package_name
: Query information about an installed package. Sample Command and Output:
$ rpm -q example-package
example-package-2.0-1.el7.x86_64
Description:
rpm -q <package_name>
: Queries information about a specific installed package, such as its version and architecture.rpm -qi package_name
: Display detailed information about an installed package. Sample Command and Output:
$ rpm -qi example-package
Name : example-package
Version : 2.0
Release : 1.el7
Architecture: x86_64
Install Date: Wed 21 Apr 2023 03:10:50 PM UTC
Group : Applications/System
Size : 2345678
License : GPLv2+
Summary : An example package
Description :
This is an example package used for demonstration purposes.
Description:
rpm -qi <package_name>
: Provides detailed information about the specified installed package, including its version, architecture, install date, and description.
Note: rpm
is the core package management system for Red Hat-based distributions, offering essential functions for installing, upgrading, querying, and removing software packages.