Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
23.  Managing Software (Tasks) Adding and Removing Software Packages With Package Commands How to List Information About All Installed Packages (pkginfo) Example--Displaying Detailed Information About Software Packages  Previous   Contents   Next 
   
 

How to Check the Integrity of Installed Software Packages (pkgchk)

  1. Become superuser or assume an equivalent role.

  2. Check the status of an installed package.

    # pkgchk -a| -c -v pkgid ...
    # pkgchk -d spooldir pkgid ...

    -a

    Specifies to audit only the file attributes (that is, the permissions), rather than the file attributes and contents, which is the default.

    -c

    Specifies to audit only the file contents, rather than the file contents and attributes, which is the default.

    -v

    Specifies verbose mode, which displays file names as they are processed.

    -d spooldir

    Specifies the absolute path of the spool directory.

    pkgid

    (Optional) Is the name of one or more packages (separated by spaces). If you do not specify a pkgid, all the software packages installed on the system are checked.

Example--Checking the Contents of Installed Software Packages

The following example shows how to check the contents of a package.

# pkgchk -c SUNWbash

If there are no errors, the system prompt is returned. Otherwise, the pkgck command reports the error.

Example--Checking the File Attributes of Installed Software Packages

The following example shows how to check the file attributes of a package.

# pkgchk -a SUNWbash

If there are no errors, the system prompt is returned. Otherwise, the pkgck command reports the error.

Example--Checking Software Packages Installed in a Spool Directory

The following example shows how to check a software package that was copied to a spool directory (/export/install/packages).

# pkgchk -d /export/install/packages
## checking spooled package <SUNWadmap>
## checking spooled package <SUNWadmfw>
## checking spooled package <SUNWadmc>
## checking spooled package <SUNWsadml>

Note - The checks made on a spooled package are limited because not all information can be audited until a package is installed.


Removing Software Packages


Caution - Always use the pkgrm command to remove installed packages. Do not use the rm command, which will corrupt the system's record-keeping of installed packages.


How to Remove Software Packages (pkgrm)

  1. Become superuser or assume an equivalent role.

  2. Remove an installed package.

    # pkgrm pkgid ...

    pkgid identifies the name of one or more packages (separated by spaces) to be removed. If omitted, pkgrm removes all available packages.

Example--Removing Software Packages

This example shows how to remove a package.

# pkgrm SUNWctu

The following package is currently installed:
   SUNWctu         Netra ct usr/platform links (64-bit)
                   (sparc.sun4u) 11.9.0,REV=2001.07.24.15.53

Do you want to remove this package? y

## Removing installed package instance <SUNWctu>
## Verifying package dependencies.
## Processing package information.
## Removing pathnames in class <none>
.
.
.

Example--Removing a Spooled Software Package

This example shows how to remove a spooled package.

# pkgrm -s /export/pkg SUNWdmfex.u
The following package is currently spooled:
   SUNWdmfex.u           Sun Davicom 10/100Mb Ethernet Driver (64-bit)
                         (sparc.sun4u) 11.9.0,REV=2001.07.24.15.53

Do you want to remove this package? y

Removing spooled package instance <SUNWdmfex.u>
 
 
 
  Previous   Contents   Next