Previous Page
Next Page

Adding and Removing Software Packages

When you add a software package, the pkgadd command decompresses and copies files from the installation media, such as the CD-ROM, to a local system's disk. When you use packages, files are delivered in package format and are unusable as they are delivered. The pkgadd command interprets the software package's control files and then decompresses the product files and installs them on the system's local disk.

You should know the following before installing additional application software:

  • Sun packages always begin with the prefix SUNW, as in SUNWvolr, SUNWadmap, and SUNWtcsh. Third-party packages usually begin with a prefix that corresponds to the company's stock symbol.

  • You can use the pkginfo command or the Solaris Product Registry to view software already installed on a system.

  • Clients might have software that resides partially on a server and partially on the client. If this is the case, adding software for the client requires adding packages to both the server and the client.

  • You need to know where the software will be installed, and you need to make sure you have a file system with enough disk space to store the application software. If you know the name of the software package, you can use the pkgparam command to determine where the package will be loaded. For example, to find out information about the SUNWman package, type the following:

    pkgparam -d /cdrom/sol_10_305_sparc_4/Solaris_10/Product SUNWman SUNW_PKGTYPE

    SUNW_PKGTYPE is a special parameter that reports where a Solaris software package will be installed. If the package does not have the SUNW_PKGTYPE parameter set, the pkgparam command returns an empty string. For Sun packages, this usually means that the package will be installed in /opt.

    The system responds with the location where the application will be stored:



Obtaining pkgid Information It's not always clear what the pkgid is for a particular software package or application until it is actually installed. Sometimes the release documentation that comes with the package will tell you the name of the pkgid. Other times you might need to call the vendor to get the pkgid information.


Use pkgrm To Remove Software When you remove a package, the pkgrm command deletes all the files associated with that package unless those files are also shared with other packages. If the files are shared with other packages, a system message will warn you of that fact, and you will be asked if you want to remove them anyway. Be sure you do not delete application software without using pkgrm. For example, some system administrators delete an application simply by removing the directory containing the application software. With this method, files belonging to the application that might reside in other directories are missed. With pkgrm, you'll be assured of removing all files associated with the application and not damaging installation of other packages.

Although the pkgadd and pkgrm commands do not log their output to a standard location, they do keep track of the product installed or removed. The pkgadd and pkgrm commands store information in a software product database about a package that has been installed or removed. By updating this database, the pkgadd and pkgrm commands keep a record of all software products installed on the system.

Previous Page
Next Page