Frequently Used IPS Commands (3 Minutes)
Description
Demonstrates some of the more frequently used IPS commands
OpenSolaris Versions Supported
2009.06 or newer.
Points to Hit
IPS has search/info commands; see http://blogs.sun.com/observatory/entry/querying_ips_package_contents for more
Demo Prep
Install the SUNWgcc package. Make sure that SUNWgccruntime is not installed.
Gotchas
Requires an internet connection
Demo
- pkg search gcc Finds the packages that contain "gcc" in the package name. Note, as of 2009.06, the -r option (for remote) is the default.
- pkg search gcc OR hex performs a boolean search. 'OR' is also supported.
- pkg info -l SUNWgcc Displays information about a locally installed package
- pkg info SUNWgccruntime Displays information about a package that is in the repository, but is not installed locally
- pkg list -sa | grep gcc | uniq This one takes a long time to run - so don't try it unless you have lots of time.
The pkg list lists all the contents of each package, so you can search for strings that are inside a package's contents - pkg contents -rm SUNWgccruntime Displays all the contents of a package that is in the repository, but not installed locally
- pkg set-publisher -O <URL> Adds a repository; probably not something you want to do, so just mention the command but do not press Enter.

Demo Cleanup
None