From nobody Wed Oct 18 13:17:05 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S9Wbf4Hmhz4x1jq for ; Wed, 18 Oct 2023 13:17:18 +0000 (UTC) (envelope-from 4250.82.1d5050004ba76e1.a9fc297e2340527295af805d246e14e7@email-od.com) Received: from s1-b0c6.socketlabs.email-od.com (s1-b0c6.socketlabs.email-od.com [142.0.176.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4S9Wbf2Lsxz4dj8 for ; Wed, 18 Oct 2023 13:17:18 +0000 (UTC) (envelope-from 4250.82.1d5050004ba76e1.a9fc297e2340527295af805d246e14e7@email-od.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; d=email-od.com;i=@email-od.com;s=dkim; c=relaxed/relaxed; q=dns/txt; t=1697635038; x=1700227038; h=content-transfer-encoding:content-type:mime-version:references:in-reply-to:message-id:subject:cc:to:from:date:x-thread-info:subject:to:from:cc:reply-to; bh=qdKkc+QcDSXhnh6g8xr+paJRvEt288N6+JXaYmRlVXU=; b=s+199R826KRPv4vnP3kKnvAcWTRjUP6b5uO0f0ly7BYFcJt52OIzKyJyrD64cP9gT+3sdmgSIR14o15pB0woqAOfNnc+SoZWZXQkRc1eurBh2qOEp6T1IgZFvReEaeMV7W1Rz9l0/R94QTBfqR8HzEKxl/SYtg7bJ6bIdP3ZhME= X-Thread-Info: NDI1MC4xMi4xZDUwNTAwMDRiYTc2ZTEucXVlc3Rpb25zPWZyZWVic2Qub3Jn Received: from r1.us-east-1.aws.in.socketlabs.com (r1.us-east-1.aws.in.socketlabs.com [142.0.191.1]) by mxsg2.email-od.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Wed, 18 Oct 2023 09:17:11 -0400 Received: from smtp.lan.sohara.org (EMTPY [185.202.17.215]) by r1.us-east-1.aws.in.socketlabs.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Wed, 18 Oct 2023 09:17:07 -0400 Received: from [192.168.63.1] (helo=steve.lan.sohara.org) by smtp.lan.sohara.org with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1qt6Q6-0005EF-Dl; Wed, 18 Oct 2023 14:17:05 +0100 Date: Wed, 18 Oct 2023 14:17:05 +0100 From: Steve O'Hara-Smith To: "Edward Sanford Sutton, III" Cc: questions@freebsd.org Subject: Re: How to reinstall *ALL* pkgs Message-Id: <20231018141705.20e86e0813b98f15c385b2db@sohara.org> In-Reply-To: References: <39b235c6-a8f1-4383-b491-24b32eed2b7d@app.fastmail.com> <20231018061047.d3a3111c4104ac9bc666999d@sohara.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.1) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7381, ipnet:142.0.176.0/22, country:US] X-Rspamd-Queue-Id: 4S9Wbf2Lsxz4dj8 On Wed, 18 Oct 2023 05:20:06 -0700 "Edward Sanford Sutton, III" wrote: > On 10/17/23 22:10, Steve O'Hara-Smith wrote: > > On Tue, 17 Oct 2023 16:11:46 -0700 > > "Edward Sanford Sutton, III" wrote: > > > >> `pkg query -e '%a = 0' %o` is the more complete "I installed this" > > To correct myself, `pkg prime-origins` is the same as `pkg query -e '%a > = 0' %o` on my system with v1.20.8; `pkg alias` reveals that; could have > sworn there was a difference somewhere. prime-origins seems to return > manually installed nonleaf packages The %a = 0 clause means that it returns all packages that are not marked as auto installed so yes it will indeed return manually installed non-leaf packages. > > I usually use pkg leaf which expands to > > > > pkg query -e '%#r == 0' '%n-%v' > > The %#r == 0 clause means that it will return all packages that nothing depends on. > `pkg leaf` includes package version #s and pkg doesn't check for True - I usually wind up removing the version bit which is a PITA. pkg-prime-origins also includes the category. -- Steve O'Hara-Smith Odds and Ends at http://www.sohara.org/ Host: Beautiful Theory meet Inconvenient Fact Obit: Beautiful Theory died today of factual inconsistency