Uninstall Oracle 12c in Windows and Unix/Linux to remove Oracle software and configuration files completely.
Sometimes we need to remove or un-install Oracle Database from our computer. These topics describe how to remove Oracle software and configuration files for version Oracle 12c in Windows and Unix/Linux.
Uninstalling oracle database is little bit complex because it sets different file in different location during install. If properly those file is not deleted Oracle will not install next time.
Windows
For deleting Oracle completely including configurations, you need delete all files and folders whatever it is located.
- Uninstall all Oracle components using the Oracle Universal Installer (OUI).
- Delete environment variable
- Delete registers - Run regedit.exe and delete the HKEY_LOCAL_MACHINE/SOFTWARE/Oracle key. This contains registry entires for all Oracle products.
- Delete oracle folder from Computer\HKEY_LOCAL_MACHINE\SOFTWARE - delete by right click
- Delete all services in oracle related -Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
- Delete Oracle home directory
- Delete oracle folder from C:\Program Files
- Delete start menu programdata from ProgramData: C:\ProgramData\Microsoft\Windows\Start Menu\Programs folder which is oracle related. ProgramData is normally hidden.
- Clear the temporary files : type %temp% in window search option
Unix/Linux
Uninstalling all products from UNIX is a lot more consistent. If you do need to resort to a manual uninstall you should do something like:
- Uninstall all Oracle components using the Oracle Universal Installer (OUI).
- Stop any outstanding processes using the appropriate utilities.
# oemctl stop oms user/password # agentctl stop # lsnrctl stop
- Alternatively you can kill them using the kill -9 pid command as the root user.
- Delete the files and directories below the $ORACLE_HOME.
# cd $ORACLE_HOME # rm -Rf *
- With the exception of the product directory, delete directories below the $ORACLE_BASE.
# cd $ORACLE_BASE # rm -Rf admin doc jre o*
- Delete the /etc/oratab file. If using 9iAS delete the /etc/emtab file also.
# rm /etc/oratab /etc/emtab