BSD Newsletter.com
   Front | Info | Lists | Newsfeeds | Study Guide | What is BSD?
Advertisement: The OpenBSD PF Packet Filter Book: PF for NetBSD, FreeBSD, DragonFly and OpenBSD

BSD Links
·New Links
·Advocacy
·Drivers
·Events
·Flavours
·FAQs
·Guides
·Programming
·Security
·Software
·User Groups

This is the BSDA Study Guide Book written via a wiki collaboration. This is a work in progress. You may contribute to or discuss this specific page at http://bsdwiki.reedmedia.net/wiki/Determine_what_software_is_installed_on_a_system.html.

Determine what software is installed on a system

Concept

Recognize that on BSD systems, software and dependencies are tracked by a package manager if the software was installed using packages, ports or pkgsrc. Be familiar with querying the package manager to determine what software and their versions are installed on the system.

Introduction

TODO: what about non-packages?

Examples

pkg_info -a shows all installed packages (TODO: is -a needed on all platforms)

The following is quick example from a NetBSD mail server. (Note that the MTA software is not listed with pkg_info because it is included with the base system (i.e. the core operating system).

# pkg_info
digest-20060826     Message digest wrapper utility
bash-3.2.9          The GNU Bourne Again Shell
spamd-20070405      OpenBSD spam deferral daemons and tools

TODO add some more examples

TODO mention about FreeBSD's -x

The following example for FreeBSD's pkg_info uses the -W switch to show what package a file belongs too. (You can also use an full path to the filename.)

# pkg_info -W pal2rgb
/usr/local/bin/pal2rgb was installed by package tiff-3.5.7

With pkgsrc, this can be done with the -F switch which shows details for the package owning the file (using full path). Use -Fe to just show the package name, for example:

$ pkg_info -Fe `which ps2pdf`
ghostscript-gnu-8.15nb3

(Notice this example runs which to get full path of the command.)

Practice Exercises

More information

pkg_info(1)



Front | Information | Lists | Newsfeeds