From owner-freebsd-questions@freebsd.org Fri Nov 10 14:26:03 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FBB0E6F313 for ; Fri, 10 Nov 2017 14:26:03 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4A93775A6E for ; Fri, 10 Nov 2017 14:26:03 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: by mailman.ysv.freebsd.org (Postfix) id 46D61E6F312; Fri, 10 Nov 2017 14:26:03 +0000 (UTC) Delivered-To: questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44748E6F311 for ; Fri, 10 Nov 2017 14:26:03 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from bede.home.qeng-ho.org (bede.qeng-ho.org [217.155.128.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "fileserver.home.qeng-ho.org", Issuer "fileserver.home.qeng-ho.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D0EFE75A6D for ; Fri, 10 Nov 2017 14:26:01 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from arthur.home.qeng-ho.org (arthur.home.qeng-ho.org [172.23.1.2]) by bede.home.qeng-ho.org (8.15.2/8.15.2) with ESMTP id vAAEPjko032167; Fri, 10 Nov 2017 14:25:45 GMT (envelope-from freebsd@qeng-ho.org) Subject: Re: Find ports that are not in the requeirement of others To: Roland Smith , Olivier Cc: questions@freebsd.org References: <20171110055737.GA30695@slackbox.erewhon.home> From: Arthur Chance Message-ID: <898813fa-5bc5-dae2-5d40-618e07761b9c@qeng-ho.org> Date: Fri, 10 Nov 2017 14:25:45 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171110055737.GA30695@slackbox.erewhon.home> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Nov 2017 14:26:03 -0000 On 10/11/2017 05:57, Roland Smith wrote: > On Fri, Nov 10, 2017 at 09:58:17AM +0700, Olivier wrote: >> Hi, >> >> After a couple of years runnig and using one single machine, installing >> some ports for testing, etc. I end up with hundred of ports and >> packages, especially libraries that I never use directly, so am not >> really aware of. >> >> Is there an incantation of pkg(8) that can list all the ports that are a >> leaf in the tree of the installed ports. > > From pkg-query(8): > > pkg query -e '%#r = 0' %o > > Roland > Or if you have the default config file installed, simply pkg leaf It's an alias, although the query format is '%n-%v' rather than %o. -- An amusing coincidence: log2(58) = 5.858 (to 0.0003% accuracy).