If there is a malfunction in an installed component, you might want to revert to an older version of that component. The way to restore an older version of a component is to first uninstall the current version of the component, then install the specific older version that you want to reinstate.
Be sure to verify that the older version of the component is in the repository before you uninstall your current version.
Stop GlassFish Server.
See To Stop a Domain.
To ensure that the pkg command can locate the application image, change to the base installation directory for GlassFish Server.
cd as-install |
The base installation directory for GlassFish Server.
Verify that the older version of the component is still available:
pkg list -fa pkg-name |
For example:
pkg list -fa jersey NAME (PUBLISHER) VERSION STATE UFIX jersey 1.1.5-1.0 installed ---- jersey 1.1.4.1-1.0 known u--- jersey 1.1.4.1-1.0 known u--- jersey 1.1.4.1-1.0 known u--- |
Obtain a list of your installed components:
pkg list |
Uninstall the currently-installed component that you want to replace.
pkg uninstall package-name |
For example:
pkg uninstall jersey |
Install the older version of the component.
pkg install package-name@version |
For example:
pkg install jersey@0.7-0.2 |
Verify that the older version is installed:
pkg list |
Start GlassFish Server.
See To Start a Domain.
For the full syntax and options of the pkg command, see the pkg(1) man page. This man page is installed only after the pkg utilities have been fully installed.
To view this man page on UNIX and Linux systems, type the following command in a terminal window:
man -M as-install-parent/pkg/man/ pkg
To view this man page on Windows systems, use the type command to view the file as-install-parent\pkg\man\cat1\pkg.1.