Bootstrap FreeKB - IBM WebSphere - Uninstall application using wsadmin
IBM WebSphere - Uninstall application using wsadmin

Updated:   |  IBM WebSphere articles

If you are not familiar with wsadmin.sh (Linux) / wsadmin.bat (Windows), check out my article Getting Started with wsadmin.

Here is an example of how to list applications using wsadmin.

~]$ /opt/WebSphere/AppServer/profiles/your_deployment_manager_profile/bin/wsadmin.sh -lang jython -c "print AdminApp.list()"
WASX7209I: Connected to process "dmgr" on node Node01 using SOAP connector;  The type of process is: DeploymentManager
myApp01
myApp02
myApp03

 

Before uninstalling an app, you should definitely first export the app, so you can re-install the app using the export.

/opt/WebSphere/AppServer/profiles/your_deployment_manager_profile/bin/wsadmin.sh -lang jython -c "print AdminApp.export('myApp','/usr/local/websphere/backups/ears/myApp.ear', '[-exportToLocal]')"

 

Then AdminApp.uninstall can be used to uninstall the application.

~]$ /opt/WebSphere/AppServer/profiles/your_deployment_manager_profile/bin/wsadmin.sh -lang jython -c "print AdminApp.uninstall('myApp')"
WASX7209I: Connected to process "dmgr" on node myDmgr using SOAP connector;  The type of process is: DeploymentManager
ADMA5017I: Uninstallation of your_deployment_manager_profile started.
ADMA5104I: The server index entry for WebSphere:cell=Cell01,node=Node01 updated successfully.
ADMA5102I: The configuration data for myApp from the configuration repository is deleted successfully.
ADMA5011I: The cleanup of the temp directory for application myApp is complete.
ADMA5106I: Application myApp uninstalled successfully.

 

AdminApp.install can be used if you need to re-install the app, for example, to install the application in a single node cluster.

/opt/WebSphere/AppServer/profiles/your_deployment_manager_profile/bin/wsadmin.sh -lang jython -c "print AdminApp.install('/usr/local/websphere/backups/ears/myApp.ear','[-cell Cell01 -node Node01 -cluster cluster1]')"

 

Or to install the application is a multi-node cluster.

/opt/WebSphere/AppServer/profiles/your_deployment_manager_profile/bin/wsadmin.sh -lang jython -c "print AdminApp.install('/usr/local/websphere/backups/ears/myApp.ear','[-cell Cell01 -node Node01 -node Node02 -cluster cluster1]')"

 

Or to install the application to a single application server.

/opt/WebSphere/AppServer/profiles/your_deployment_manager_profile/bin/wsadmin.sh -lang jython -c "print AdminApp.install('/usr/local/websphere/backups/ears/myApp.ear','[-node Node01 -cell Cell01 -server server1]')"

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 51d518 in the box below so that we can be sure you are a human.