Removing a Domain in WebLogic

First of all, shutdown your domain (in this example, my domain is called ‘oldDomain’ and has one Managed Server):

export MW_HOME=/u01/app/oracle/middleware
export WLS_HOME=$MW_HOME/wls_10.3.6
export DOMAIN_NAME=oldDomain
export DOMAIN_HOME=$MW_HOME/user_projects/domains/$DOMAIN_NAME

$DOMAIN_HOME/bin/stopWebLogic.sh
$DOMAIN_HOME/bin/stopManagedWebLogic.sh ManagedServer_1

Remove the domain entry from the Node Manager file:

vi $WLS_HOME/common/nodemanager/nodemanager.domains

…remove this line:

oldDomain=/u01/app/oracle/middleware/user_projects/domains/oldDomain

Remove the domain registry entry relevant to your domain:

vi $MW_HOME/domain-registry.xml

…remove this line:

<domain location="u01/app/oracle/middleware/user_projects/domains/oldDomain"/>

Finally, delete the ‘oldDomain’ applications (if any have been deployed) and then the directory structure:

rm -Rf $MW_HOME/user_projects/applications/oldDomain
rm -Rf $MW_HOME/user_projects/domains/oldDomain

All done!

Leave a comment

Your email address will not be published.