If you decide to use DBCA to delete the database, you can do this:
If you want to completely remove an Oracle 10.2g instance from an Oracle home directory you first need to identify the instance in the oratab file. For example, this entry shows that the testdb Oracle database instance is associated with the following ORACLE_HOME:
Next, you need to set the environment for the database that you want to remove, for example:
ORACLE_SID = [testdb] ? mydb
Now you can start the Database Configuration Assistant (DBCA):
Then, select the Database to delete (mydb) and click finish.
Removing an Oracle database deletes all of the data in the database.
For example, among other things, this action will delete:
1) All files resulting from this query (for mydb):
SELECT name FROM v$datafile
SELECT name FROM v$controlfile
SELECT name FROM v$tempfile
SELECT member FROM v$logfile
2) Entry associated with mydb in oratab
3) Entries associated with mydb in listener.ora and tnsnames.ora
You can also delete a database using DBCA in silent mode. For example, for single instance database:
dbca -silent -deleteDatabase -sourceDB <Oracle_Sid>
If you want to keep this data, make sure that you back up the database before deleting it.
Starting with Oracle Database 11g Release 2 (11.2), you can take advantage of the deinstall command.