How to install and remove software package in rhel8.2
Updated: Oct 3, 2021
Document ID: RHEL004
In my last post i've discussed about VIM the powerful text editor, in this post I'm going to discuss about software package installation, update and removal process in Red Hat Enterprise Linux 8.2
Previous post vim the powerful text editor
rpm, is a tool that can get information about content of the package file and installed package
rpm, also use to install, upgrade and remove software package from RedHat Linux System
yum , rpm command can be used to install and upgrade software package but it is not designed to work with package repositories or resolve dependencies, to resolve dependencies we use yum.
In this tutorial we’ll see how we can use both rpm and yum commands to install and upgrade software from RHEL DVD
To check installed software list we can use below command
Using rpm command:
[root@RHEL82 ~]# rpm –qa
[root@RHEL82 ~]# rpm -qa |less
[Press “Enter” or “space” to check details and then press ‘q’ to exit]
Using yum command:
[root@RHEL82 ~]# yum list
[root@RHEL82 ~]# yum list |less
[Press “Enter” or “space” to check details and then press ‘q’ to exit]
To check whether a specific package installed or not
Using rpm command:
[root@RHEL82 ~]# rpm -qa |grep httpd
Output:
redhat-logos-httpd-81.1-1.el8.noarch
httpd-2.4.37-21.module+el8.2.0+5008+cca404a3.x86_64
httpd-filesystem-2.4.37-21.module+el8.2.0+5008+cca404a3.noarch
httpd-manual-2.4.37-21.module+el8.2.0+5008+cca404a3.noarch
httpd-tools-2.4.37-21.module+el8.2.0+5008+cca404a3.x86_64
Using yum command:
[root@RHEL82 ~]# yum list httpd
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Installed Packages
httpd.x86_64 2.4.37-21.module+e
If the software package is not installed the command output is blank
[root@RHEL82 ~]# rpm -qa |grep vsftpd
[root@RHEL82 ~]#
[root@RHEL82 ~]# yum list vsftpd
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Error: No matching Packages to list
We saw that vsftp (ftp server package) is not installed in the system.
To install ftp package using rpm command from RHEL DVD
Step1:
For Physical Server: Insert RHEL8.2 DVD into DVD-ROM
For Virtual Machine: CD Drive- Path- RHEL8.2.ISO file as image file in the virtual machine setting like below example

Step2: Mount RHEL8.2 DVD to /media directory
[root@RHEL82 /]# mount /dev/sr0 /media/
mount: /media: WARNING: device write-protected, mounted read-only.
[root@RHEL82 /]# cd /media/
[root@RHEL82 media]# ls
AppStream BaseOS EFI EULA extra_files.json GPL images isolinux media.repo RPM-GPG-KEY-redhat-beta RPM-GPG-KEY-redhat-release TRANS.TBL
[/dev/sr0 or it may be /dev/sr1, we can use /dev/sr then press “tab” key to check available devices name]
Now, DVD has mounted in /media directory.
Step3: Go to /media/AppStream//Packages/
[root@RHEL82 Packages]# cd /media/AppStream//Packages/
[root@RHEL82 Packages]# pwd