How do I uninstall & Install rpm packages

RPM command is used for installing, uninstalling, upgrading, querying, listing, and checking RPM packages on your Linux system.
RPM stands for Red Hat Package Manager.
With root privilege, you can use the rpm command with appropriate options to manage the RPM software packages.
1. Installing a RPM package
When you install a RPM, it checks whether your system is suitable for the software the RPM package contains, figures out where to install the files located inside the rpm package, installs them on your system, and adds that piece of software into its database of installed RPM packages.

The following rpm command installs jre client package.


[root@sujeet ]# rpm -ivh <package-name.rpm>

rpm command and options
  • -i : install a package
  • -v : verbose
  • -h : print hash marks as the package archive is unpacked.

2. Query all the RPM Packages 

You can use rpm command to query all the packages installed in your system.
[root@sujeet ]# rpm -qa <package-name.rpm>
  • -q query operation
  • -a queries all installed packages
To identify whether a particular rpm package is installed on your system, combine rpm and grep command as shown below. Following command checks whether jre package is installed on your system.
[root@sujeet ]# rpm -qa| grep jre*

3. Query a Particular RPM Package

The above example lists all currently installed package. After installation of a package to check the installation, you can query a particular package and verify as shown below.
[root@sujeet ]# rpm -q <package-name.rpm>
Note: To query a package, you should specify the exact package name. If the package name is incorrect, then rpm command will report that the package is not installed.
4. Information about Installed RPM Package 
rpm command provides a lot of information about an installed pacakge using rpm -qi as shown below:
[root@sujeet ]# rpm -qi <package-name.rpm>
[root@sujeet ]# rpm -qip <package-name.rpm>
If you have an RPM file that you would like to install, but want to know more information about it before installing, you can do the following:
  • -i : view information about an rpm
  • -p : specify a package name

5. List all the Files in a Package 

To list the content of a RPM package, use the following command, which will list out the files without extracting into the local directory folder.
[root@sujeet ]# rpm -qlp <package-name.rpm>
  • q : query the rpm file
  • l : list the files in the package
  • p : specify the package name

6. Upgrading a RPM Package

Upgrading a package is similar to installing one, but RPM automatically un-installs existing versions of the package before installing the new one. If an old version of the package is not found, the upgrade option will still install it.
[root@sujeet ]# rpm -Uvh <package-name.rpm>
7. Uninstalling a RPM Package
To remove an installed rpm package using -e as shown below. After uninstallation, you can query using rpm -qa and verify the uninstallation.
[root@sujeet ]# rpm -e <package-name.rpm>

8. Verifying all the RPM Packages

The following command verifies all the installed packages.
[root@sujeet ]# rpm -Va <package-name.rpm>
9. If  your Independence issue than use below commend
  
[root@sujeet ]# rpm -nodeps -Uvh package-name.rpm

No comments:

ORA-00059: Maximum Number Of DB_FILES Exceeded in 19C database

When I am adding datafile to my 19C database facing the below error. SQL> alter tablespace DATA  add datafile '/u01/data/data15.dbf&#...