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.
Verify that the older version of the component is still available:
pkg list -a |
Obtain a list of your installed components:
pkg list |
Uninstall the currently-installed component that you want to replace.
Use the following syntax: pkg uninstall package-name. For example:
pkg uninstall jersey |
Install the older version of the component.
Use the following syntax: pkg install package-name —version version-number. For example:
pkg install jersey -version 0.7-0.2 |
Verify that the older version is installed:
pkg list |
Full syntax and options for using the pkg command are contained in the pages in the as-install /pkg/man/ directory. These reference pages are not displayed by using the man command. Instead, use a command such as more or cat.