blob: 964b39ab86bb3331392d12dc1d6df8fa0ce36286 [file] [log] [blame]
type=page
status=published
title=uninstall-node
next=uninstall-node-dcom.html
prev=unfreeze-transaction-service.html
~~~~~~
= uninstall-node
[[uninstall-node-1]][[GSRFM00246]][[uninstall-node]]
== uninstall-node
Uninstalls {productName} software from specified hosts
[[sthref2206]]
=== Synopsis
[source]
----
asadmin [asadmin-options] uninstall-node [--help]
[--installdir as-install-parent]
[--sshport ssh-port] [--sshuser ssh-user]
[--sshkeyfile ssh-keyfile]
[--force={false|true}]
host-list
----
[[sthref2207]]
=== Description
The `uninstall-node` subcommand uninstalls {productName} software
from the hosts that are specified as the operand of the subcommand. This
subcommand requires secure shell (SSH) to be configured on the host
where the subcommand is run and on each host where the {productName}
software is being uninstalled.
[NOTE]
====
This subcommand is equivalent to the
link:uninstall-node-ssh.html#uninstall-node-ssh-1[`uninstall-node-ssh`(1)]
subcommand. To uninstall {productName} software on hosts that use
the Distributed Component Object Model (DCOM) remote protocol, use the
link:uninstall-node-dcom.html#uninstall-node-dcom-1[`uninstall-node-dcom`(1)]
subcommand.
====
By default, if any node except the predefined node ``localhost-``domain
resides on any host from which {productName} software is being
uninstalled, the subcommand fails. To uninstall the {productName}
software from a host on which user-defined nodes reside, set the
`--force` option to `true`. If the `--force` option is `true`, the
subcommand removes the entire content of the parent of the base
installation directory.
If a file under the parent of the base installation directory is open,
the subcommand fails.
If multiple hosts are specified, the configuration of the following
items must be the same on all hosts:
* Parent of the base installation directory for the {productName} software
* SSH port
* SSH user
* SSH key file
The subcommand does not modify the configuration of the domain
administration server (DAS).
This subcommand is supported in local mode only.
[[sthref2208]]
=== Options
asadmin-options::
Options for the `asadmin` utility. For information about these
options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page.
`--help`::
`-?`::
Displays the help text for the subcommand.
`--installdir`::
The absolute path to the parent of the base installation directory
where the {productName} software is installed on each host, for
example, `/export/glassfish7/`. +
The user that is running this subcommand must have write access to the
specified directory. Otherwise, an error occurs. +
The specified directory must contain the installation of the
{productName} software on the host. Otherwise, an error occurs. +
The default is the parent of the base installation directory of the
{productName} software on the host where this subcommand is run.
`--sshport`::
The port to use for SSH connections to the host where the
{productName} software is to be uninstalled. The default is 22.
`--sshuser`::
The user on the host where the {productName} software is to be
uninstalled that is to run the process for connecting through SSH to
the host. The default is the user that is running this subcommand. To
ensure that the DAS can read this user's SSH private key file, specify
the user that is running the DAS process.
`--sshkeyfile`::
The absolute path to the SSH private key file for user that the
`--sshuser` option specifies. This file is used for authentication to
the `sshd` daemon on the host. +
The user that is running this subcommand must be able to reach the
path to the key file and read the key file. +
The default is a key file in the user's `.ssh` directory. If multiple
key files are found, the subcommand uses the following order of preference:
1. `id_rsa`
2. `id_dsa`
3. `identity`
`--force`::
Specifies whether the subcommand uninstalls the {productName}
software from a host even if a user-defined node resides on the host.
Possible values are as follows:
`false`;;
If a user-defined node resides on a host, the software is not
uninstalled and the subcommand fails (default). +
If the `--force` option is `false`, the subcommand removes only the
{productName} software files. Other content if the parent of the
base installation directory, such as configuration files, are not
removed.
`true`;;
The subcommand uninstalls the {productName} software from the
host even if a user-defined node resides on the host.
+
If the `--force` option is `true`, the subcommand removes the entire
content of the parent of the base installation directory.
[[sthref2209]]
=== Operands
host-list::
A space-separated list of the names of the hosts from which the
{productName} software is to be uninstalled.
[[sthref2210]]
=== Examples
[[GSRFM773]][[sthref2211]]
==== Example 1   Uninstalling {productName} Software From the Default Location
This example uninstalls {productName} software on the hosts
`sj03.example.com` and `sj04.example.com` from the default location.
[source]
----
asadmin> uninstall-node sj03 sj04
Successfully connected to gfuser@sj03.example.com using keyfile /home/gfuser
/.ssh/id_rsa
Successfully connected to gfuser@sj04.example.com using keyfile /home/gfuser
/.ssh/id_rsa
Command uninstall-node executed successfully.
----
[[GSRFM774]][[sthref2212]]
==== Example 2   Forcibly Uninstalling {productName} Software
This example uninstalls {productName} software on the host
`sj02.example.com`.
The software is uninstalled even if a user-defined node resides on the
host. The entire content of the `/export/glassfish7` directory is
removed.
Some lines of output are omitted from this example for readability.
[source]
----
asadmin> uninstall-node --force --installdir /export/glassfish7 sj02.example.com
Successfully connected to gfuser@sj02.example.com using keyfile /home/gfuser
/.ssh/id_rsa
Force removing file /export/glassfish7/mq/lib/help/en/add_overrides.htm
Force removing file /export/glassfish7/mq/lib/help/en/add_connfact.htm
...
Force removing directory /export/glassfish7/glassfish/lib/appclient
Force removing directory /export/glassfish7/glassfish/lib
Force removing directory /export/glassfish7/glassfish
Command uninstall-node executed successfully.
----
[[sthref2213]]
=== Exit Status
0::
command executed successfully
1::
error in executing the command
[[sthref2214]]
=== See Also
link:asadmin.html#asadmin-1m[`asadmin`(1M)]
link:install-node.html#install-node-1[`install-node`(1)],
link:install-node-dcom.html#install-node-dcom-1[`install-node-dcom`(1)],
link:install-node-ssh.html#install-node-ssh-1[`install-node-ssh`(1)],
link:uninstall-node-dcom.html#uninstall-node-dcom-1[`uninstall-node-dcom`(1)],
link:uninstall-node-ssh.html#uninstall-node-ssh-1[`uninstall-node-ssh`(1)]