Listing and Verifying Installed Packages
At any time, you can use the Software Product Registry or issue the pkginfo command from the command line to obtain a complete listing of the software installed on a system. The Product Registry GUI will display information about installed software, as described in the previous section and as shown in Figure 2.3.
Figure 2.3. The pkginfo output.
Figure 2.3 illustrates the pkginfo command used from the command line, piped to more to show the display of information one page at a time.
Table 2.4 lists some of the files and directories used with package administration.
The /var/sadm directory is extremely important, especially when changes are made to the software installed on your system in any form. This directory is used to record the changes made to the system when installing or removing software and patches. Many Solaris change management utilities rely upon the information inside /var/sadm for an accurate picture of what actually resides on the system.
/var/sadm/install/contents is a file that can be used to determine which package an individual file belongs to. You can also use it to determine which files are associated with a certain software group. For example, to find out what things are associated with the format command:
grep /etc/format /var/sadm/install/contents
/etc/format=../usr/sbin/format s none SUNWcsr /etc/format.dat v none 0644 root sys 6986 55261 1106350052 SUNWcsr
/var/sadm/pkg/ <package name> is the directory where all the information about your software packages is stored. It is critical to keep this directory intact and up to date by using the standard package installation commands described in this section.
Do Not Remove Files from /var/sadm DO NOT remove files from /var/sadm. The removal of files from this directory may not impact the system for quite some time, but as soon as a patch or package needs to be applied or removed from the system, you will run into a variety of problems.