From owner-freebsd-questions@FreeBSD.ORG Fri Mar 27 08:34:31 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1D96106566B for ; Fri, 27 Mar 2009 08:34:31 +0000 (UTC) (envelope-from me@janh.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.freebsd.org (Postfix) with ESMTP id 56FDE8FC0A for ; Fri, 27 Mar 2009 08:34:30 +0000 (UTC) (envelope-from me@janh.de) Received: from janh.freebsd (e177241171.adsl.alicedsl.de [85.177.241.171]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MKv1o-1Ln7Vx20Zy-000jBQ; Fri, 27 Mar 2009 09:34:10 +0100 Message-ID: <49CC8F78.9090001@janh.de> Date: Fri, 27 Mar 2009 09:34:00 +0100 From: Jan Henrik Sylvester User-Agent: Thunderbird 2.0.0.21 (X11/20090321) MIME-Version: 1.0 To: Olivier Nicole References: 200903270205.n2R254v0003403@banyan.cs.ait.ac.th Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+2KoevGu0u4oXnlaCvBC9FnWXvkx70X1Hfiw5 DGIJlNEu/lw7RgwYkUSm/taoafvG687nllHr5y0qe5wwkeNwKN /yba9XijEn11Yjz1LXL5g== Cc: questions-list freebsd Subject: Re: How to list all the installed packages... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2009 08:34:32 -0000 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. Cheers, Jan Henrik