Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I using solaris 10 and i have a pkg files how can i list out the its contents?

share|improve this question
up vote 3 down vote accepted

A list of the (to be installed) files can be displayed using the pkgchk command:

pkgchk -d package.pkg -l

If the pkg file has contains more than one package, you will be prompted. e.g.

The following packages are available:
  1  JetRedHat     JET RedHat support
                   (sparc) 4.4
  2  SUNWjet       Sun JumpStart Enterprise Toolkit
                   (sparc,i386) 4.7

Select package(s) you wish to process (or 'all' to process

The pkgtrans command can change the entire package from datastream to file system fomat if the -i option is not used. This can be helpful if you want to see the actions that occur after the package is installed onto a system. e.g:

less SUNWjet/install/postinstall
share|improve this answer

Unfortunately the Solaris package management system doesn't make this easy. You could try the following:

pkgtrans -i <pkgfile> spool

This will extract the pkginfo and pkgmap (list of files) files to /var/spool/pkg/package_name. You could review them there.

share|improve this answer

I get the package content through the command below:

$ strings <your-package-name> | grep ^"1 "
share|improve this answer

You can run for a spesific package which installed;

#pkgchk  -l <packagename>

Also before installing you can run and check package content.

pkgchk -d  expect-5.45-sol10-x86-local   -l 

And you can check for a spesific path.

pkgchk -lp /usr/local/bin/expect

Check this link for more details and command usage examples.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.