11 Deinstalling Oracle Database XE

When you deinstall Oracle Database XE, all components, including data files, the database, and the software, are removed.

If you want to save your data files but remove the Oracle Database XE software and database, then first export the data before you deinstall.

Because the deinstallation process removes all files from the directory in which Oracle Database XE is installed, back up any files from the directory (if needed) before you deinstall. The database will no longer be operational after deinstallation.

Execute this procedure as root or with root privileges.

$ sudo -s

Run the following commands to deinstall Oracle Database XE:

  • This deletes all the Oracle Database XE data files, the listener and configuration files. After this operation, only logs and the Oracle Home software will be present.
    # /etc/init.d/oracle-xe-18c delete
  • This removes the software. After this operation, some content under Oracle Base /opt/oracle will remain and can be deleted manually.
    # yum remove oracle-database-xe-18c
  • Optional: If you only installed Oracle Database XE on the system and have no further Oracle Database software installed, you can also remove the Oracle Database Preinstall RPM:

    # yum remove oracle-database-18c-preinstall