Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Mar 2009 09:34:00 +0100
From:      Jan Henrik Sylvester <>
To:        Olivier Nicole <>
Cc:        questions-list freebsd <>
Subject:   Re: How to list all the installed packages...
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help
Olivier Nicole wrote:
 > Is there a way to show a list of all installed packages that are not
 > required by any other package?

cd /var/db/pkg/ ; for i in *-* ; do if [ ! -e $i/+REQUIRED_BY ] ; then 
echo $i ; fi ; done

 > Ultimately, that would give a list of "software" versus "libraries".

Not really. Only runtime dependencies are in +REQUIRED_BY, not build 
time dependencies.

 > The question arise because, while installing a new machine, I found
 > out that I have help2man installed, that is not required by any other
 > package, that I did not install myself, that looks unneeded to me
 > (until I may need it one day). So I would remove it; and would like to
 > make a list of what is removable (that I did not install, and that is
 > not required).

help2man is a build dependency of flex, which is a build dependency of 
gstreamer. gstreamer is a runtime dependency of many application 
(wxwidget stuff; from kde world: amarok2, ktorrent; from gnome: gimp, 
pidgin, ...) If you update or rebuild gstreamer, help2man and flex will 
be reinstalled and the update takes longer than necessary.

If you want to be able to update ports quickly, you should keep the 
build dependencies. Doing "make pretty-print-build-depends-list" in a 
ports directory gives you the build dependencies.

Jan Henrik

Want to link to this message? Use this URL: <>