Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 May 2018 10:44:03 +0100
From:      Steve O'Hara-Smith <steve@sohara.org>
To:        Doug Hardie <bc979@lafn.org>
Cc:        Robert Fitzpatrick via freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Upgrading 10.4 to 11.1
Message-ID:  <20180501104403.ef13e3663e7e6993f7c069ed@sohara.org>
In-Reply-To: <4859E693-65B7-4844-B1D7-96C2CA570477@mail.sermon-archive.info>
References:  <5AE783D2.40004@webtent.org> <20180501001407.7752facafb7593fd6aa252c1@gmail.com> <5AE78836.30106@webtent.org> <20180501072305.faafbe6cf2a13d3e24156568@sohara.org> <4859E693-65B7-4844-B1D7-96C2CA570477@mail.sermon-archive.info>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 1 May 2018 01:00:40 -0700
Doug Hardie <bc979@lafn.org> wrote:

> > On 30 April 2018, at 23:23, Steve O'Hara-Smith <steve@sohara.org> wrote:
> > 
> > On Mon, 30 Apr 2018 17:18:46 -0400
> > Robert Fitzpatrick via freebsd-questions <freebsd-questions@freebsd.org>
> > wrote:
> > 
> >> Is there a way to delete and put back all the packages currently
> >> installed?
> > 
> > 	Here's one way using the handy pkg leaf alias to get packages
> > with no dependencies.
> > 
> > pkg leaf > my_packages
> > pkg delete -a
> > pkg install `cat my_packages`
> > 
> > 	If my_packages is large you may need to use xargs instead of
> > backticks.
> 
> Interesting.  The leaf command is not documented in the -l list or in the
> man page.  However, it works just as described above.

	This is why

$ pkg help leaf
`leaf` is an alias to `query -e '%#r == 0' '%n-%v'`

	There's a bunch of handy aliases defined in /usr/local/etc/pkg.conf

-- 
Steve O'Hara-Smith                          |   Directable Mirror Arrays
C:\>WIN                                     | A better way to focus the sun
The computer obeys and wins.                |    licences available see
You lose and Bill collects.                 |    http://www.sohara.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180501104403.ef13e3663e7e6993f7c069ed>