If you have ever tried to get rid of Oracle Database from your machine then I think you will agree with me, when I say that uninstalling Oracle Database is not as easy as any other software from your system. In this tutorial you will learn the manual process of uninstalling Oracle Database 18c from your Windows 10.

Info
The process of uninstalling Oracle Database 18c will remain the same for both Microsoft Windows 10 x64bit as well as Windows 10×32 bit. Thus you can follow the steps and enjoy the tutorial.

In order to completely remove Oracle Database 18c from your Windows 10 operating system, you need to follow five simple steps. These five steps are:

  1. Delete the Environment Variable
  2. Delete the Oracle Database 18c Windows registries
  3. Restart Your System
  4. Delete the Oracle Home User and Groups
  5. Delete The Oracle Database 18c

Let’s look at each of these steps in detail and learn how to uninstall Oracle Database 18c from Windows 10 operating system.

Step 1: Delete the Environment Variable.

Deleting Environment Variable is not only important but also recommended. Especially if you are planning to reinstall any version of Oracle Database on your machine and don’t want to face the error which says “Environment variable path is too long”.

What is an Environment Variable for Oracle Database?

Environment variable is the path to the bin directory which is located in oracle home (also known as DB_Home). This bin directory consists of all the necessary executable files for your oracle 11g server.

How to find out the Environment Variable for your Oracle 18c?

I have done a quick video on how to find out the DB Home and SID of your Oracle 18c, which you can check here.

How to Delete Environment Variable for Oracle 11g

Right Click on “This PC” icon and Select “Properties”. Then from the left hand side panel of the system properties windows select “Advance System Settings”. This will open up “System Properties” Windows. Inside this go to “Advance” Tab and select “Environment Variable” 

This PC’s Properties – Advance System Settings – System properties (go to the Advance Tab) – Environment Variable

For the proper working of Oracle Database there are various windows services which runs in the background. These services are backed up by windows registries. In order to completely delete the Oracle Database 18c we need to delete all the major windows registries associated with it.

Before you start doing anything let me tell you that this is a very crucial step. You have got to be very careful while deleting any registries. I would suggest you to take a backup before deleting them.

Precaution:
Before deleting this registry make sure only oracle database 18c software is installed on your system. In case you have other software from oracle installed then take a good look at the contents of this folder and delete only those associated with Oracle Database 18c.

How to take a backup of your registries?

For precautionary purposes taking a backup of your registries is highly recommended.

  1. To backup “Oracle Software” Registry go to HKEY_LOCAL_MACHINE inside the registry editor and then select SOFTWARE. Right click on it and then select EXPORT. After that select a location and give it a name then click – Save.
  2. To backup Oracle Database Services registries go to HKEY_LOCAL_MACHINE inside the registry editor and after that go to sub directory “Systems” then to “CurrentControlSet”. Right click CurrentControlSet and select export. Then choose a destination and give it a name.

That’s all you have to do to take a backup. I recommend you to take the backup on an external storage device like a thumb drive.

How to Delete Oracle Database 18c Registries?

There are 2 sets of registries that we have to delete here. First one is for Oracle Database 18c software and another is for all those services which run in the background and are responsible for proper working of your oracle database.

Launch The Registry Editor.

As in windows operating systems all the windows registries are organized into “Registry Editor”, thus to access them you first need to go to the “Registry Editor”. The easiest way to access the “Windows Registry Editor” is through “Run Command” box.

Open up your Run command box by pressing “Windows Key” and “R” key simultaneously. In order to open up the Registry editor in your windows you have to write REGEDIT in your run dialogue box.

how to uninstall oracle database 18c from windows 10 by manish sharma

Delete the registries for oracle database background services.

There are total six main registries in Windows 10 which handle all the background services for Oracle Database 18c. These are:

  1. OracleJobSchedulerORCL
  2. OracleOraDB18Home1MTSRecoveryService
  3. OracleOraDB18Home1TNSListener
  4. OracleRemExecServiceV2
  5. OracleServiceORCL
  6. OracleVssWriterORCL

The postfix ORCL is default SID for the Oracle database 18c Enterprise Edition (which is installed on my system) it could be different in your case. Make sure you delete only the registries shown in the above list.

In order to stop all the background services of Oracle 18c we need to delete these registries from the operating system. To delete them you first need to locate them. The location path for these registries are as follows:

HKEY_LOCAL_MACHINE >>SYSTEM >>CurrentControlSet >>Services

how to uninstall oracle database 18c from windows 10 by manish sharma

Under the “services” directory you will have to find all the registries that I have listed above and delete them.

Delete the registries for oracle database Software.

Next you have to delete the windows registry for Oracle Database 18c software. It contains information like your DB_Home, SQLPATH, location for your control file and archive file, your SID etc. The name of this registry is “Oracle” and its location is:

HKEY_LOCAL_MACHINE\SOFTWARE

how to uninstall oracle database 18c from windows 10 by manish sharma

Under the “software” – search for directory “Oracle”. Once you have reached this directory, right click and Delete it.

Step 3: Restart your System

As we have deleted all the major windows registries associated with our Oracle Database 18c thus in order to bring these changes to effect, you must restart your system.

Step 4: Delete the Oracle Home User and Groups

Since the launch of Multi-tenant architecture Oracle added an extra step to the installation of Oracle Database software where we need to create a dedicated windows User which Oracle Server utilizes for handling all the Oracle User Groups. To uninstall the Oracle Database 18c we need to delete that Oracle Home user as well as all the Oracle User Groups from our Windows 10.

Launch the “Local Users and Group Window”.

Similar to the registry editor, in windows operating system, all the Windows Users and Groups are organized under “Local User and Group” Windows. And similar to windows registry the fastest way to launch the “Local Users and Group windows” is once again through “Run command” box.

Thus to open the “Local User and Group” Window open up your “Run Command” box and write the command “lusrmgr.msc”. This will launch the desired window for you.

how to uninstall oracle database 18c from windows 10 by manish sharma

In “Local Users and Groups” windows first you need to go to the “Users” directory. Here locate the Window user which you created during the installation for your Oracle Database 18c and delete it.

how to uninstall oracle database 18c from windows 10 by manish sharma

Once you are done deleting the user, next you have to delete all the Windows Groups which Oracle universal Installer (OUI) created during the installation.

Delete Oracle User Groups.

By default Oracle Universal Installer creates 14 Windows User Groups for Oracle Database 18c during installation. These 14 Groups are:

  1. ORA_ASMADMIN
  2. ORA_ASMDBA
  3. ORA_ASMOPER
  4. ORA_CLIENT_LISTENERS
  5. ORA_DBA
  6. ORA_DBSVCACCTS
  7. ORA_GRID_LISTENERS
  8. ORA_INSTALL
  9. ORA_OPER
  10. ORA_OraDB18Home1_DBA
  11. ORA_OraDB18Home1_OPER
  12. ORA_OraDB18Home1_SYSBACKUP
  13. ORA_OraDB18Home1_SYSDG
  14. ORA_OraDB18Home1_SYSKM

Once again, if along with Oracle 18c there are other software from Oracle installed on your system then be careful to delete only those that are listed above.

how to uninstall oracle database 18c from windows 10 by manish sharma

You can find all the above listed groups in the “Groups” directory which you can access from the right hand side panel of the “Local Users and Groups” windows.

how to uninstall oracle database 18c from windows 10 by manish sharma

Once you have successfully located all the desired user groups, delete them all. That’s all you have to do in this step.

Step 5: Delete the Oracle Home and Oracle base.

Now that you have deleted all the registries and groups associated with your Oracle Database 18c & restarted your PC then you are all set to delete your Oracle Home and Oracle Base. The two main directories where Oracle Universal Installer has saved all the Oracle Database 18c related files and folders.

What is Oracle Home?

Oracle Home is the directory where oracle database software is installed in your operating system’s file structure.

Locate your Oracle Home and Base and delete them. In case you are not able to delete them, then first make sure you are logged on to your windows using an administrative account. Second, chances are there, that your system may have a pending restart, so restart your machine and try again.

Clean The Program File.

Next go to your Program File folder which is placed in your main drive where OS is installed. Here locate a folder with the name “Oracle” and delete it.

That’s all you have to do. This is the proper manual uninstallation of Oracle Database 18c. After this you will be free to install any Oracle Database version on your windows without formatting it.

Thanks & have a great day!