DEV Community

Cover image for How to FIND, REMOVE and INSTALL A PACKAGE in RHEL8
AakritiGoyal12458
AakritiGoyal12458

Posted on

How to FIND, REMOVE and INSTALL A PACKAGE in RHEL8

95% of the commands we use in any OS are created by the software's/Packages. For Example, if we talk about Red Hat Linux Operating System: below we can see which date which cal
date commandHere we run rpm -q -f /usr/bin/date
In simple words the command means red hat package management i have a query who created this file /usr/bin/date
and in return it will provide you with a software name.rpm query commandSo let's start our demo by 1st finding Firefox package, let's run and check if it exists or not.check package exist or not Now,

  1. Find Firefox package rpm -q firefoxImage description
  2. Remove the package using rpm -e firefoxImage description check if firefox is installed Image description
  3. try to install firefox rpm -i firefox Image description OOPS! WE ENCOUNTER AN ERROR No such file this means we cannot install Firefox like this. When we downloaded RHEL8 we had one DVD or iso file downloaded with us which is basically a bootable image. We will use this image as it already has 5k+ software in it. So, add the image in the optical drive. for that 1st soft shut down the system using init 0. Image description now go to Settings ->Storage->Add Optical drive -->Add the pre installed iso imageas shown below Image descriptionImage description After Inserting DVD, you will face 2 options regarding reinstalling the OS. but as you already have OS installed so to avoid this go to Settings ->System ->Boot Order and change it to hard drive and then optical drive. So, from now onwards if according to boot order if OS already exist in Hard Disk no option to reinstall will be shown and if OS do not exist in Hard Disk, then only install from DVD option will be shown. Now you can find DVD in GUI after going to Activities. Image description All the Packages are stored in AppStream and BaseOs . NOTE: they all have extension as _.rpm _ Right click in white space: click on open in Terminal option you will be landed directly in DVD folder. Image description Now our plan is to install Firefox. Image description Image description lets install Firefox using rpm -i firefox...(click TAB to get the full name at your terminal ) Image description let's check if software is installed using rpm -q firefox. Image description Thank You.

Top comments (0)