Sometimes it might be useful to reinstall or completly remove Oracle Database 11g from your system. In this tutorial I’ll show you how to do it on Microsoft Windows 7.
We start with removing environment variable. Go to Control Panel\System and Security\System and on the right side click on Advanced system settings and on Advanced tab click on Environment Variables, then in System variables doubleclick on Path and in Variable value find Oracle home path, it could be something like C:\app\johndoe\product\188.8.131.52\dbhome_1\bin; and delete that Oracle home path.
Second step is to stop services and daemon processes.
You could do so with Windows Registry Editor (you should start Windows Registry editor by pressing Windows key + R and then typing regedit).
In this step good advice is to backup registry first, so click to HKEY_LOCAL_MACHINE and then right-click on SOFTWARE and select Export and choose some File name for example backup-reg-hkey-local-machine-software.reg and Save it.
Then click through HKEY_LOCAL_MACHINE -> SOFTWARE -> and right-click on ORACLE and click on Delete and submit Yes to permanently delete.
Another backup, so click through HKEY_LOCAL_MACHINE -> SYSTEM -> right-click on CurrentControlSet and select Export and again choose some File name like backup-reg-hkey-local-machine-system-currentcontrol-set.reg and Save it.
Then click through HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> services delete all registries which starts with Oracle prefix (it’s Oracle11, OracleDBConsoleorcl, OracleJobSchedulerORCL , OracleMTSRecoveryService, OracleOraDb11g_home1ClrAgent, OracleOraDb11g_home1TNSListener, OracleServiceORCL and OracleVssWriterORCL), you could do that by right-clicking on each and then selecting delete as we did in previous step.
Now restart your system which will stop all services related with Oracle as we already deleted them in registry.
After system restart you need to delete Oracle DB files, these files are in my case located at C:\app\johndoe and delete folders here (it’s admin, cfgtoollogs, checkpoints, diag, flash_recovery_area, oradata and product). And we’re done with uninstalling Oracle DB 11g on Microsoft Windows 7.
Note: It’s tested on Microsoft Windows 7 but it could probably work on Microsoft Windows 8 without any difference as well.