Removing Packages

In previous releases of SunOS, you could remove unbundled software packages with the rm(1) command, which simply removed the files associated with a file system. Chances are that you would not know the names of all the files associated with a package. The Solaris packaging system, on the other hand, keeps track of all the files, directories, and their permissions for any application package. Therefore, you should always use the provided package commands, especially when removing a package. The pkgrm command makes administration easier by removing a complete unbundled package with a single command.

Use the following syntax to remove a package in interactive mode.

/usr/sbin/pkgrm pkgid
					

In the following example, the package SUNWdiag is removed.

oak% su
Password:
# pkgrm
						SUNWdiag

The following package is currently installed:
   SUNWdiag        Online Diagnostics Tool
(sparc) 2.1

Do you want to remove this package [y,n,?,q] y

## Removing installed package instance <SUNWdiag>
## Verifying package dependencies.
## Processing package information.
## Removing pathnames in <none> class
/opt/SUNWdiag/lib/libtest.a
/opt/SUNWdiag/lib
/opt/SUNWdiag/include/sdrtns.h
/opt/SUNWdiag/include
/opt/SUNWdiag/bin/what_rev
/opt/SUNWdiag/bin/vmem
/opt/SUNWdiag/bin/tapetest
/opt/SUNWdiag/bin/sunlink
/opt/SUNWdiag/bin/sundials
/opt/SUNWdiag/bin/sundiagup
/opt/SUNWdiag/bin/sundiag.info
/opt/SUNWdiag/bin/sundiag
/opt/SUNWdiag/bin/sunbuttons
/opt/SUNWdiag/bin/sptest
/opt/SUNWdiag/bin/revision_ref_file
/opt/SUNWdiag/bin/rawtest
/opt/SUNWdiag/bin/prp
/opt/SUNWdiag/bin/probe
/opt/SUNWdiag/bin/pmem
/opt/SUNWdiag/bin/nettest
/opt/SUNWdiag/bin/music.au
/opt/SUNWdiag/bin/mptest
/opt/SUNWdiag/bin/lpvitest
/opt/SUNWdiag/bin/isdntest
/opt/SUNWdiag/bin/gttest.data
/opt/SUNWdiag/bin/gttest
/opt/SUNWdiag/bin/fstest
/opt/SUNWdiag/bin/fputest
/opt/SUNWdiag/bin/fbtest
/opt/SUNWdiag/bin/dispatcher
/opt/SUNWdiag/bin/diagscrnprnt
/opt/SUNWdiag/bin/cg6test
/opt/SUNWdiag/bin/cg12.data.gsxr
/opt/SUNWdiag/bin/cg12.data
/opt/SUNWdiag/bin/cg12
/opt/SUNWdiag/bin/cdtest
/opt/SUNWdiag/bin/cbrtest
/opt/SUNWdiag/bin/bpptest
/opt/SUNWdiag/bin/autest.data
/opt/SUNWdiag/bin/autest
/opt/SUNWdiag/bin/audbri
/opt/SUNWdiag/bin/57fonts.400
/opt/SUNWdiag/bin/57fonts.300
/opt/SUNWdiag/bin
/opt/SUNWdiag
## Updating system information.

Removal of <SUNWdiag> was successful.
#

To remove a package in noninteractive mode, use the pkgrm -n option, as shown below.

/usr/sbin/pkgrm -n pkgid
					

To remove a package that was spooled to a directory, use the pkgrm -s option, as shown below.

/usr/sbin/pkgrm -s spooldir [ pkgid ]

In this example, spooldir is the name of the spool directory to which the unbundled package was spooled and pkgid is the name of the package specified for removal. When you do not supply a package identifier, pkgrm interactively prompts you to remove or preserve each package listed in the spool directory.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.80.45