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-21c 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-21c
  • 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-preinstall-21c-1.0-0.3.el7.x86_64
    • # yum remove oracle-database-preinstall-21c-1.0-0.3.el8.x86_64
  • You can delete the downloaded RPM files, for example:
    # rm oracle-database-preinstall-21c-1.0-1.el7.x86_64.rpm
    # rm oracle-database-preinstall-21c-1.0-1.el8.x86_64.rpm
    # rm oracle-database-xe-21c-1.0-1.x86_64.rpm