Oracle by Example brandingRemove Oracle Database Using yum

section 0Before You Begin

This tutorial shows you how to remove and deinstall an RPM-based Oracle Database 18c installation.

Background

You can use this procedure to remove an 18c Oracle Database that you might have installed using RPM packages on Oracle Linux 6 or Oracle Linux 7.

This procedure will not work for databases installed using other methods.

Note: The ORACLE_HOME path for this software installation is /opt/oracle/product/18c/dbhome_1.

What Do You Need?

  • Oracle Linux 7 or Oracle Linux 6 64-bit on the target server.
  • A minimum of 2 GB swap space.
  • If you are performing the installation on your laptop, then ensure that the /etc/hosts file contains a fully qualified name for the target server.

section 1Remove an RPM-based Oracle Database 18c Installation

  1. Log in as root.
  2. Run the following command to remove the RPM-based database installation:
    # yum -y remove oracle-database-ee-18c
    

    view-oracle-database-rpm-installation-removed-output

Note: If the yum command detects other configured components in the Oracle home such as databases or listeners, then it stops the deinstallation process.

A message is displayed that instructs you to remove the configured components manually. Remove those configured components.


section 2Remove Configured Components in the Oracle Home

  1. Login as the Oracle Database installation owner user (oracle).
  2. To remove any database associated with your installation, use Oracle Database Configuration Assistant (Oracle DBCA):
    $ cd $ORACLE_HOME/bin 
    $ ./dbca
    
  3. In Select Database Operation window, click Delete database.
    Description of dbca-delete-database.png follows
    Description of the illustration dbca-delete-database.png
  4. In Select Database window, select the database that you want to delete. For example, delete the database ORCLCDB.
  5. Specify the SYSDBA user credentials.
  6. In Select De-Register Management Option window, uncheck the De-register from Enterprise Manager (EM) cloud control to skip this option. Click Next to view the summary page.
  7. In the Progress Page window, click Yes to confirm deletion of Oracle instances and data files for your database.
  8. To remove any listeners associated with your installation, run Oracle Net Configuration Assistant (Oracle NETCA).
    $ cd $ORACLE_HOME/bin 
    $ ./netca
  9. In Oracle Net Configuration Assistant window, select Delete.
    Description of netca-delete-listerner.png follows
    Description of the illustration netca-delete-listerner.png
  10. In Select Listener window, select the listener that you want to delete.
  11. Click Yes to delete the listener.
  12. Log in as root and run the yum command again to remove the rpm-based database installation.
    # yum -y remove oracle-database-ee-18c

next stepNext Tutorial

Run RPM Packages to Install Oracle Database

Create a Sample Database


more informationWant to Learn More?