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


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

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.


I get the package content through the command below:

$ strings <your-package-name> | grep ^"1 "

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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