7/7

# 2 Uninstalling GlassFish Server 3.1.2

This chapter describes how to uninstall Oracle GlassFish Server 3.1.2 software.

## Removing a GlassFish Server Installation

This section describes how to remove Oracle GlassFish Server 3.1.2 software.

The following topics are addressed here:

- To Uninstall GlassFish Server Software After a ZIP File Installation

- To Uninstall GlassFish Server Software After a GUI-Mode Installation

### To Uninstall GlassFish Server Software After a ZIP File Installation

This procedure describes how to uninstall GlassFish Server software that was installed using a ZIP file, as described in Installing GlassFish Server From a ZIP File.

Before You Begin

Stop all domains and other related processes, including command prompts using the installation directory or its subdirectories, the Update Tool notifier process if present, and any applications using Java SE files.

To stop domains, use the `asadmin stop-domain` command. For more information about stopping a domain, see "To Stop a Domain" in Oracle GlassFish Server Administration Guide.

To stop the Update Tool notifier process, use the `updatetool --notifier --shutdown` command, executed from as-install-parent`/bin`.

If orphaned processes remain, identify and terminate the processes as follows:

- Solaris, Linux, and Mac OS X systems:

  Use the `ps -ef` command and terminate the processes using the `kill` command.

- Windows systems:

  Use the Task Manager and terminate the processes.

Also see "Known Issues" in Oracle GlassFish Server Release Notes for known issues related to uninstallation.

1. Save any files in the installation directory that you may want to keep.

2. Manually delete installation directory and all its contents.

### To Uninstall GlassFish Server Software After a GUI-Mode Installation

This procedure describes how to uninstall GlassFish Server software that was installed using a self-extracting file, as described in Installing GlassFish Server From a Self-Extracting Bundle.

During installation, a script for uninstalling GlassFish Server is placed in the installation directory. This section provides instructions for removing the software using this script. If you attempt to remove the software using another method, problems are likely to arise when you try to reinstall the same version of GlassFish Server or when you install a new version.

1. Stop all GlassFish Server domains and other related processes, including the following:

   - All domains, clusters, and instances

   - Command shells that may be active in the product installation directory or subdirectories

   - The GlassFish Server Update Tool Notifier process, if present

   - Any applications that are using Java SE files

   1. To stop domains, use the `asadmin stop-domain` command.

      For more information about stopping a domain, see "To Stop a Domain" in Oracle GlassFish Server Administration Guide.

   2. To stop the Update Tool Notifier process, use the `updatetool --notifier --shutdown` command, executed from as-install-parent`/bin`.

   3. If orphaned processes remain, identify and terminate the processes as follows:

      1. Solaris, Linux, and Mac OS X systems

         Use the `ps -ef` command and terminate the processes using the `kill` command.

      2. Windows systems

         Use the Task Manager and terminate the processes.

2. Navigate to the directory in which GlassFish Server 3.1.2 is installed.

   Alternatively, if you are running on Windows and want to run the uninstaller from the Windows Start menu, you can skip this step and jump ahead to the next step.

   The default installation directories are as follows:

   - Solaris, Linux, and Mac OS X systems

         user-home-directory/glassfish3

   - Windows systems

         SystemDrive\glassfish3

   The default installation directory is referred to as as-install-parent throughout GlassFish Server documentation.

3. Start the uninstallation program and remove the software.

   - Solaris, Linux, and Mac OS X systems:

     1. If necessary, grant execute permissions to the uninstall file.

            chmod +x ./uninstall.sh

     2. At the command prompt, type:

            sh ./uninstall.sh

   - Windows systems, from the Start menu (recommended):

     Choose Start>Programs>Oracle GlassFish Server>Uninstall.

   - Windows systems, from the command line:

     Double-click the `uninstall.exe` file.

     On Windows you can also start the uninstaller by typing the file name at the command prompt.

     Tip:

     There is a known issue on Windows 7 systems (Issue 12093), whereby uninstallation of GlassFish Server may fail because Windows cannot find the required JDK installation. The problem may occur when the Java binaries are not installed through a standard Java SDK installer. This problem does not occur when running the uninstaller from the Windows Start menu.

     The workaround for this issue is to explicitly specify the location of the Java binaries when running the GlassFish Server `uninstall` utility from the command line. For example:

     `uninstall.exe -j "%JAVA_HOME%"`

   Note:

   To uninstall in silent (non-interactive) mode, use the `-s` option after the file name. For example: `./uninstall.sh -s` or `uninstall.exe -s`

4. Review the summary page that displays following uninstallation and click Exit to exit the uninstaller.

   Uninstallation information is captured in log files. The names of the files are timestamp `-remove.log` and timestamp`-remove-summary.html`. On Solaris, Linux, and Mac OS X systems, these files are generated by default in the `/tmp` directory. On Windows systems, these files are generated in the %TEMP% directory.

5. Examine the contents of the remaining installation directories and remove any files or directories that you do not want.

   Note:

   Not all GlassFish Server directories are automatically removed by the uninstallation program. Remove the remaining contents as desired, including hidden directories prefixed with a dot. It is safe to remove uninstallation and installation log files after you have examined them.