Thursday, 26 April 2012

Manually remove Oracle installation from Linux

Stop all the databases and listener on the box either manually or using your startup script
Code Snippet
  1. /etc/init.d/oracle stop
End of Code Snippet


You can view all oracle processes using the command, this will search all running processes that begin with 'ora'.
Code Snippet
  1. ps -ef | grep ora
End of Code Snippet


Kill the relevent processes using the process' PID and the kill command
Code Snippet
  1. kill <PID>
End of Code Snippet


Remove all files within your $ORACLE_BASE directory (Don't forget to re-create this directory structure on a new install)
Code Snippet
  1. rm -rf $ORACLE_BASE
End of Code Snippet


Remove all Oracle references in etc
Code Snippet
  1. rm -rf /etc/ora*
End of Code Snippet


Remove any temporary files
Code Snippet
  1. rm -rf /tmp/.oracle
  2. rm -rf /var/tmp/.oracle
End of Code Snippet


This should be enough to remove Oracle from the machine...

No comments: